SetSysModalWindow

2.x

  HWND SetSysModalWindow(hwnd)    
  HWND hwnd; /* handle of window to become system modal */

The SetSysModalWindow function makes the given window the system-modal window.

Parameters

hwnd

Identifies the window to be made system modal.

Return Value

The return value is the handle of the window that was previously the system-modal window, if the function is successful.

Comments

If another window is made the active window (for example, the system-modal window creates a dialog box that becomes the active window), the active window becomes the system-modal window. When the original window becomes active again, it is once again the system-modal window. To end the system-modal state, destroy the system-modal window.

If a WH_JOURNALRECORD hook is in place when SetSysModalWindow is called, the hook is called with a hook code of HC_SYSMODALON (for turning on the system-modal window) or HC_SYSMODALOFF (for turning off the system-modal window).

See Also

GetSysModalWindow