|
-
June 4th, 2003, 07:36 AM
#1
Wm_message?
This question relates to messages, subclassing and hooking windows and windows messages.
Now, I have my application that successfully hooks GetMessageW() and DispatchMessageW() in another.
What I wish to do with this program I have hooked is to subclass a window STRAIGHT AFTER it has been created.
I just don't understand how I would do this though. I mean, the inadequate solution I am using now works- check if FindWindow() returns a HWND every time GetMessageW() is called- but this is exactly my problem. GetMessageW() doesn't get called until it gets a message from user input. So I need to actually bring down a menu or similar to call GetMessageW(). This means that EVERYTIME GetMessageW() is called it calls FindWindow() in hope.
And even if it does find the window (the dialog has been created) it'll miss all the messages until I actually do something to the window. I want to EnableWindow(HWND, FALSE) almost immediately after it has been drawed.
There has to be a way to SetWindowLongPtr() immediately after a Dialog has been created... but how? What message would be sent through the messagepump to the app when a new dialog is created? Is there even one?
I'm soo lost. The only thing I can think of is hooking a Create Dialog function...
Could someone please help me on this one?
-
June 4th, 2003, 07:44 AM
#2
What about SetWindowsHookEx with WH_CBT parameter?
-
June 4th, 2003, 07:48 AM
#3
Originally posted by Alex F
What about SetWindowsHookEx with WH_CBT parameter?
Nah, I'm trying to avoid SetWindowsHookEx()- all hooking + more can be achieved by hooking the functions that receive messages from the message pump. And I don't need to worry about ALT+CTRL+DEL, CTRL+ESC or ALT+ESC terminating it
-
June 4th, 2003, 08:35 AM
#4
Or, would anyone have any idea which API function would 'most likely' be called when a dialog box is to be created?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|