How To Use One IsDialogMessage() Call for Many Modeless Dialogs (71450)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0
- Microsoft Windows Software Development Kit (SDK) 3.0
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q71450 SUMMARY
In the Windows environment, an application can implement more than one
modeless dialog box with a single call to the IsDialogMessage() function.
This can be done by using the following three-step method:
- Maintain the window handle to the currently active modeless dialog
box in a global variable.
- Pass the global variable as the hDlg parameter to the
IsDialogMessage() function, which is normally called from the
application's main message loop.
- Update the global variable whenever a modeless dialog box's window
procedure receives a WM_ACTIVATE message, as follows:
- If the dialog is losing activation (wParam is 0), set the global
variable to NULL.
- If the dialog is becoming active (wParam is 1 or 2), set the
global variable to the dialog's window handle.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbDlg kbhowto KB71450 |
---|
|