WinQueryCapture: Difference between revisions
Appearance
Created page with "This function returns the handle of the window that has the pointer captured. ==Syntax== WinQueryCapture(hwndDesktop) ==Parameters== ;hwndDesktop (HWND) - Input: Desktop-window handle. :HWND_DESKTOP: The desktop-window handle. :Other: Specified desktop-window handle. ==Returns== ;hwnd (HWND) - Returns: Handle of the window with the pointer captured. :;NULLHANDLE: No window has the pointer captured, or an error occurred. :;Handle: Handle of the window with the poi..." |
|||
Line 6: | Line 6: | ||
==Parameters== | ==Parameters== | ||
;hwndDesktop ([[HWND]]) - Input: Desktop-window handle. | ;hwndDesktop ([[HWND]]) - Input: Desktop-window handle. | ||
:HWND_DESKTOP: The desktop-window handle. | :;HWND_DESKTOP:: The desktop-window handle. | ||
:Other: Specified desktop-window handle. | :;Other:: Specified desktop-window handle. | ||
==Returns== | ==Returns== |
Latest revision as of 01:43, 9 April 2025
This function returns the handle of the window that has the pointer captured.
Syntax
WinQueryCapture(hwndDesktop)
Parameters
- hwndDesktop (HWND) - Input
- Desktop-window handle.
- HWND_DESKTOP
- : The desktop-window handle.
- Other
- : Specified desktop-window handle.
Returns
- hwnd (HWND) - Returns
- Handle of the window with the pointer captured.
- NULLHANDLE
- No window has the pointer captured, or an error occurred.
- Handle
- Handle of the window with the pointer captured.
Errors
Possible returns from WinGetLastError:
- PMERR_INVALID_HWND (0x1001)
- An invalid window handle was specified.
Example Code
#define INCL_WININPUT /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndDesktop; /* Desktop-window handle. */ HWND hwnd; /* Handle of the window with the pointer captured. */ hwnd = WinQueryCapture(hwndDesktop);
This function returns the handle of the window that has the pointer captured.
#define INCL_WININPUT #define INCL_WINWINDOWMGR #include <OS2.H> HWND hwnd; /* handle of window that has pointer captured */ hwnd = WinQueryCapture(HWND_DESKTOP); /* window that has */ /* pointer captured */