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.
WinLoadPointer (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINPOINTERS
 
HPOINTER WinLoadPointer(hwndDesktop, hmod, idPtr)
HWND hwndDesktop;    /* handle of the desktop                  */
HMODULE hmod;        /* handle of the module with the resource */
USHORT idPtr;        /* resource identifier                    */
 
The WinLoadPointer function loads a pointer. The pointer can then be used as
the mouse pointer by calling the WinSetPointer function.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hwndDesktop  Identifies the desktop window. This parameter can be
             HWND_DESKTOP or the desktop window handle.
 
hmod         Identifies the module that contains the pointer. This parameter
             can be either the module handle returned by the DosLoadModule
             function or NULL for the application's module.
 
idPtr        Identifies the pointer.
 
Return Value
 
The return value is a handle to the pointer if the function is successful,
or NULL if an error occurs.
 
Example
 
This example calls WinLoadPointer to load an application-defined pointer.
When processing the WM_MOUSEMOVE message, the loaded pointer is displayed by
calling WinSetPointer.
 
case WM_CREATE:
    hptrCrossHair = WinLoadPointer(HWND_DESKTOP,
        (HMODULE) NULL,    /* load from .exe file    */
        IDP_CROSSHAIR);    /* identifies the pointer */
 
case WM_MOUSEMOVE:
    WinSetPointer(HWND_DESKTOP, hptrCrossHair);
 
See Also
 
DosLoadModule, WinCreatePointer, WinDestroyPointer, WinDrawPointer,
WinQuerySysPointer, WinSetPointer