Hello, I've been using windows hooks (SetWindowsHookEx and WinEventHook) to tell me when a window is created. However, they do not tell me when a dialog/message box is created. How can I find out when a dialog/message box is created? TIA Nic.
Dialogs and message boxes are windows, so I I don't understand your question. "Nic" wrote in message news:pKy2k.6952$X6.5223@newsfe30.ams2... > Hello, > > I've been using windows hooks (SetWindowsHookEx and WinEventHook) to tell > me when a window is created. However, they do not tell me when a > dialog/message box is created. How can I find out when a dialog/message > box is created? > > TIA > Nic. > >
On Jun 7, 9:32 am, "Nic" wrote: > Hello, > > I've been using windows hooks (SetWindowsHookEx and WinEventHook) to tell me > when a window is created. However, they do not tell me when a dialog/message > box is created. How can I find out when a dialog/message box is created? > > TIA > Nic. Hi, The WH_CBT hook should do what you want nicely as the hook insinuates itself into Window's handling of about everything that involves a window (creation and deletion). The hook itself must reside in a .DLL file if it is to catch notifications on a global rather than per-application basis. http://msdn.microsoft.com/en-us/library/ms644959(VS.85).aspx http://msdn.microsoft.com/en-us/library/ms997537.aspx Kellie.
Kellie Fitton wrote: > On Jun 7, 9:32 am, "Nic" wrote: >> I've been using windows hooks (SetWindowsHookEx and WinEventHook) to tell me >> when a window is created. However, they do not tell me when a dialog/message >> box is created. How can I find out when a dialog/message box is created? > Hi, > > The WH_CBT hook should do what you want Irrelevant. Read the question..
"Nic" wrote in message news:pKy2k.6952$X6.5223@newsfe30.ams2... > Hello, > > I've been using windows hooks (SetWindowsHookEx and WinEventHook) to tell > me when a window is created. However, they do not tell me when a > dialog/message box is created. How can I find out when a dialog/message > box is created? All you can do is filter the message events based on the class of the new window. A dialog box will be a member of class "32768". You can also look at the window text and whatever text controls the dialog contains to determine if it's the window you're looking for. -- - Gary Chanson (Windows SDK MVP) - Abolish Public Schools