win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinQuerySysPointer (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINPOINTERS
 
HPOINTER WinQuerySysPointer(hwndDesktop, iptr, fLoad)
HWND hwndDesktop;    /* handle of the desktop     */
SHORT iptr;          /* system-pointer identifier */
BOOL fLoad;          /* load/unload flag          */
 
The WinQuerySysPointer function returns the system pointer handle.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hwndDesktop  Identifies the desktop window. This parameter can be
             HWND_DESKTOP or the desktop window handle.
 
iptr         Specifies the system pointer. For a list of possible values,
             see the Predefined mouse pointers topic. The appearance of
             system pointers is implementation dependent.
 
fLoad        Specifies whether to copy the system pointer. If this parameter
             is TRUE, the system pointer is copied and the handle to the new
             pointer is returned. If it is FALSE, then the system pointer
             handle is returned. You should specify TRUE if you intend to
             modify an existing pointer.
 
Return Value
 
The return value is a pointer handle.
 
Example
 
This example calls WinQuerySysPointer to get a handle to the system pointer,
and then loads an application-defined pointer. After it is done using the
application-defined pointer, it restores it to the system pointer.
 
/* get the system pointer */
 
hptrDefault = WinQuerySysPointer(HWND_DESKTOP, SPTR_ARROW, FALSE);
 
/* load an application-defined pointer */
 
hptrCrossHair = WinLoadPointer(HWND_DESKTOP, (HMODULE) NULL, IDP_CROSSHAIR);
 
/* change the pointer to the application pointer */
 
WinSetPointer(HWND_DESKTOP, hptrCrossHair);
 
/* restore the system pointer */
 
WinSetPointer(HWND_DESKTOP, hptrDefault);
 
See Also
 
WinQueryPointer, WinQueryPointerInfo, POINTERINFO