win12.hlp (Table of Contents; Topic list)
WinSetSysModalWindow (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINWINDOWMGR
 
BOOL WinSetSysModalWindow(hwndDesktop, hwnd)
HWND hwndDesktop;    /* handle of the desktop                          */
HWND hwnd;           /* handle of the window that becomes system modal */
 
The WinSetSysModalWindow function makes a window the system modal window or
ends the system modal state.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hwndDesktop  Identifies the desktop window. This parameter can be
             HWND_DESKTOP or the desktop window handle.
 
hwnd         Identifies the window that is to become the system modal
             window. If this parameter is NULL, the system modal state
             terminates and input processing returns to its normal state.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Comments
 
Input processing can enter a system modal state. In this state, all mouse
and keyboard input is directed to a special main window, called the system
modal window, or to one of its child windows. All other main windows act as
if they are disabled and no interaction is possible with them.
 
The disabled windows are not actually disabled but rather made
noninteractive. No messages are sent to these windows when the system modal
state is entered or left, and their WS_DISABLE style bits are not changed.
 
Where a system modal window exists and another window is explicitly made the
active window, the newly activated window becomes the system modal window,
replacing the previous system modal window, which then becomes a
noninteractive window. When the system modal window is destroyed, the window
activated as a result becomes the system modal window.
 
This function should be called only while processing keyboard or mouse
input.
 
The new system modal window is not locked during the processing of this
function.
 
See Also
 
WinQuerySysModalWindow