Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2004, 12:54 AM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default vb6, win32API, windows hooks, positioning problem

Hi everybody,

I am trying to create a program (in VB6) which talks to a C dll to set a system wide hook. The purpose of hooking is to intercept all window creation / destruction messages...so that I can position the window (which may belong to any application), at whatever position I want. This includes dialog boxes, message/error dialogs, DOS/command windows and every visible window...

I have successfully managed to set the system-wide hook in the C dll using the CBT hook, and I can intercept window creation and destruction messages. I have figured out that the window class name #32770 is the one which refers to a common dialog: such as the file-open / save-as dialogs.

I am successfully able to retrieve the window positioning details, and store them to a database, when a window is destroyed. The next time the window is created, I detect it. and retrieve the details of the window from the dB. If the details are found, then I try to set the window positioning, using SetWindowPlacement, SetWindowPos...(both work for me).

Now the main problem is: this approach detects dialog windows with class #32770, but cannot "set" the position for those dialogs. It doesnt detect the DOS window. And for some weird reason, the position and size attributes for Explorer.exe and IExplore.exe are always wrong...I get a size of something like 10000 x 10000 always...

Can someone please help me...?
I have dont quite a bit of searching online...including the API section here on XtremeVBTalk.com, but no use :(

Please point me in the right direction...

Thanks a lot!

Cheers
Krishna





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed for Windows Hooks (Global Mouse Hooks) effone Visual C++ 0 October 2nd, 2006 03:28 PM
Positioning Problem harpua CSS Cascading Style Sheets 5 May 27th, 2005 08:03 AM
menu positioning problem isheikh HTML Code Clinic 27 June 5th, 2004 10:52 AM
menu positioning problem isheikh Wrox Book Feedback 1 May 30th, 2004 12:39 AM
use MFC in WIN32API i_anubhav Visual C++ 1 June 20th, 2003 02:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.