Jump to content

WinQuerySysModalWindow

From EDM2
Revision as of 18:09, 9 April 2025 by Martini (talk | contribs) (Created page with "This function returns the current system modal window. ==Syntax==  WinQuerySysModalWindow(hwndDesktop) ==Parameters== ;hwndDesktop (HWND) - Input : Desktop-window handle. :;HWND_DESKTOP ::The desktop-window handle :;Other ::Specified desktop-window handle. ==Returns== ;hwndSysModal (HWND) - returns :Handle of system modal window. :;NULLHANDLE ::No system modal window :;Other ::Handle of system modal window. ==Remarks== For a full description of the operation...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function returns the current system modal window.

Syntax

 WinQuerySysModalWindow(hwndDesktop)

Parameters

hwndDesktop (HWND) - Input
Desktop-window handle.
HWND_DESKTOP
The desktop-window handle
Other
Specified desktop-window handle.

Returns

hwndSysModal (HWND) - returns
Handle of system modal window.
NULLHANDLE
No system modal window
Other
Handle of system modal window.

Remarks

For a full description of the operation of the system modal window, see the WinSetSysModalWindow function.

Errors

Possible returns from WinGetLastError:

  • PMERR_INVALID_HWND (0x1001) An invalid window handle was specified.

Example Code

#define INCL_WINWINDOWMGR
#include <OS2.H>

HAB  hab;
HWND hwndDeskTop, hwndSysModal;
LONG lRgbColor;

/*  Input processing can enter a "system modal" state. In */
/*  this state, all pointing  device and keyboard input   */
/*  is directed to a special window, known as the         */
/*  system-modal window. Typically, this will be a dialog */
/*  window requiring input.                               */

hwndSysModal = WinQuerySysModalWindow(hwndDeskTop);

Related Functions