WinQueryCursorInfo
Appearance
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);