WinQueryCursorInfo: Difference between revisions
Appearance
Created page with "This function obtains information about any current cursor. ==Syntax== WinQueryCursorInfo(hwndDeskTop, pcsriCursorInfo); ==Parameters== ;hwndDeskTop (HWND) - input :Desktop-..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function obtains information about any current cursor. | This function obtains information about any current cursor. | ||
==Syntax== | ==Syntax== | ||
WinQueryCursorInfo(hwndDeskTop, pcsriCursorInfo) | WinQueryCursorInfo(hwndDeskTop, pcsriCursorInfo) | ||
==Parameters== | ==Parameters== | ||
;hwndDeskTop (HWND) - input | ;hwndDeskTop (HWND) - input:Desktop-window handle. | ||
:Desktop-window handle. | ::HWND_DESKTOP:The desktop-window handle | ||
: | ::Other:Specified desktop-window handle. | ||
;pcsriCursorInfo (PCURSORINFO) - output:Cursor information. | |||
: | |||
;pcsriCursorInfo (PCURSORINFO) - output | |||
:Cursor information. | |||
:The values are equivalent to the parameters of the WinCreateCursor function except that ulrgf never includes the CURSOR_SETPOS option. | :The values are equivalent to the parameters of the WinCreateCursor function except that ulrgf never includes the CURSOR_SETPOS option. | ||
:The size and position of the cursor are returned in window coordinates relative to the window identified by the parameter of the structure. | :The size and position of the cursor are returned in window coordinates relative to the window identified by the parameter of the structure. | ||
==Returns== | ==Returns== | ||
;rc (BOOL) - returns | ;rc (BOOL) - returns:Current-cursor indicator. | ||
:Current-cursor indicator. | ::TRUE: Cursor exists | ||
: | ::FALSE: Cursor does not exist, pcsriCursorInfo is not updated by this call. | ||
: | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
;PMERR_INVALID_HWND (0x1001) | ;PMERR_INVALID_HWND (0x1001):An invalid window handle was specified. | ||
:An invalid window handle was specified. | |||
==Example Code== | ==Example Code== | ||
Line 32: | Line 26: | ||
#define INCL_WINCURSORS | #define INCL_WINCURSORS | ||
#define INCL_WINWINDOWMGR | #define INCL_WINWINDOWMGR | ||
#include < | #include <os2.h> | ||
HWND hwnd; /* handle of window that has pointer captured */ | |||
CURSORINFO cursorinfo; /* Cursor information. */ | |||
BOOL rc; | |||
WinQueryCursorInfo(hwnd_DESKTOP, /* get cursor info */ | WinQueryCursorInfo(hwnd_DESKTOP, /* get cursor info */ | ||
&cursorinfo); | &cursorinfo); | ||
</pre> | </pre> | ||
Latest revision as of 20:42, 12 April 2024
This function obtains information about any current cursor.
Syntax
WinQueryCursorInfo(hwndDeskTop, pcsriCursorInfo)
Parameters
- hwndDeskTop (HWND) - input
- Desktop-window handle.
- HWND_DESKTOP:The desktop-window handle
- Other:Specified desktop-window handle.
- pcsriCursorInfo (PCURSORINFO) - output
- Cursor information.
- The values are equivalent to the parameters of the WinCreateCursor function except that ulrgf never includes the CURSOR_SETPOS option.
- The size and position of the cursor are returned in window coordinates relative to the window identified by the parameter of the structure.
Returns
- rc (BOOL) - returns
- Current-cursor indicator.
- TRUE: Cursor exists
- FALSE: Cursor does not exist, pcsriCursorInfo is not updated by this call.
Errors
Possible returns from WinGetLastError
- PMERR_INVALID_HWND (0x1001)
- An invalid window handle was specified.
Example Code
This example obtains information about any current cursor.
#define INCL_WINCURSORS #define INCL_WINWINDOWMGR #include <os2.h> HWND hwnd; /* handle of window that has pointer captured */ CURSORINFO cursorinfo; /* Cursor information. */ BOOL rc; WinQueryCursorInfo(hwnd_DESKTOP, /* get cursor info */ &cursorinfo);