|
-
September 29th, 2010, 10:12 AM
#1
GetMessage() questions
Hi,
I want to write a program that listens for a window action (creates a window or closes a window) and when a window is created i get new window handle in an HWND array and remove it when i close the window.
By now i'm able to retrieve the main window handle and i guess i have to use the GetMessage() function, something like this;
HWND parent = FindWindow(NULL,"Main Window Name");
MSG msg;
while (GetMessage(&msg, parent, 0, 0))
{
if (msg.message == WM_CREATE )
MessageBox(NULL,"new window","Message:",MB_OK);
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Please give me some suggestions or at least point me to some good tutorials.
PS: i'm really new with win32 programming ...
Thank you.
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
|