Jump to content

WinQueryCursorInfo

From EDM2
Revision as of 20:42, 12 April 2024 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Related Functions