HCURSOR CreateCursor(hmod, xHotSpot, yHotSpot, nWidth, nHeight, pvANDplane, pvXORplane) | |||||
HANDLE hmod; | /* handle of application instance | */ | |||
int xHotSpot; | /* horizontal position of hot spot | */ | |||
int yHotSpot; | /* vertical position of hot spot | */ | |||
int nWidth; | /* cursor width | */ | |||
int nHeight; | /* cursor height | */ | |||
CONST VOID *pvANDplane; | /* address of AND mask array | */ | |||
CONST VOID *pvXORplane; | /* address of XOR mask array | */ |
The CreateCursor function creates a cursor that has the specified width, height, and bit patterns.
hmod
Identifies the module creating the cursor.
xHotSpot
Specifies the horizontal position of the cursor hot spot.
yHotSpot
Specifies the vertical position of the cursor hot spot.
nWidth
Specifies the width, in pixels, of the cursor.
nHeight
Specifies the height, in pixels, of the cursor.
pvANDplane
Points to an array of bytes that contains the bit values for the AND mask of the cursor. This can be the bits of a device-dependent monochrome bitmap.
pvXORplane
Points to an array of bytes that contains the bit values for the XOR mask of the cursor. This can be the bits of a device-dependent monochrome bitmap.
The return value identifies the cursor if the function is successful. Otherwise, it is NULL.
The nWidth and nHeight parameters must specify a width and height supported by the current display driver, since the system cannot create cursors of other sizes. An application can determine the width and height supported by the display driver by calling the GetSystemMetrics function, specifying the SM_CXCURSOR or SM_CYCURSOR value.
Before terminating, an application must call the DestroyCursor function to free any system resources associated with the cursor.
CreateIcon, DestroyCursor, GetModuleHandle, GetSystemMetrics, SetCursor