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.
WinCreatePointer (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINPOINTERS
HPOINTER WinCreatePointer(hwndDesktop, hbmPointer, fPointer, xHotspot,
yHotspot)
HWND hwndDesktop; /* handle of the desktop */
HBITMAP hbmPointer; /* handle of the bitmap */
BOOL fPointer; /* full-size or icon-size pointer */
SHORT xHotspot; /* horizontal hot spot */
SHORT yHotspot; /* vertical hot spot */
The WinCreatePointer function creates a pointer from a bitmap.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwndDesktop Identifies the desktop window. This parameter can be
HWND_DESKTOP or the desktop window handle.
hbmPointer Identifies the bitmap from which the pointer image is created.
The bitmap must be of an even vertical size, logically divided
into two sections in the vertical direction, each half
representing one of the two images used as the successive
drawing masks for the pointer. The top half is the XOR image.
The bottom half is the AND image. This allows a pointer to have
four colors: black, white, background, and inverted
background.
fPointer Indicates if the pointer is pointer- or icon-sized. If this
parameter is TRUE, the bitmap will be stretched (if necessary)
to the system-pointer dimensions. If this parameter is FALSE,
the bitmap will be stretched (if necessary) to the system-icon
dimensions.
xHotspot Specifies the horizontal offset of the pointer hot spot from
the lower-left corner (in pels).
yHotspot Specifies the vertical offset of the pointer hot spot from the
lower-left corner (in pels).
Return Value
The return value is the handle of the new pointer, or it is NULL if an error
occurs.
Comments
Since the bitmap needs to include two images, one on top of the other, the
height of the bitmap must be an even number. This function will fail if the
height is not an even number.
See Also
WinDestroyPointer, WinDrawPointer, WinLoadPointer, WinQueryPointer,
WinSetPointer
♦