This function creates a cursor having the specified size, bit patterns, and hot spot.
CONST VOID* pvANDPlane,
CONST VOID* pvXORPlane
- [in] Handle to the current instance of the application creating the cursor.
- [in] Specifies the horizontal position of the cursor's hot spot.
- [in] Specifies the vertical position of the cursor's hot spot.
- [in] Specifies the width, in pixels, of the cursor.
- [in] Specifies the height, in pixels, of the cursor.
- [in] Void pointer to an array of bytes that contains the bit values for the AND bitmask of the cursor, as in a device-dependent monochrome bitmap.
- [in] Void pointer to an array of bytes that contains the bit values for the XOR bitmask of the cursor, as in a device-dependent monochrome bitmap.
A handle to the cursor indicates success. NULL indicates failure. To get extended error information, call GetLastError.
Hotspots should be created with positive location values. If the xHotSpot or yHotSpot parameter has a negative value, the actual hotspot has an arbitrary position.
The nWidth and nHeight parameters must specify a width and height that are supported by the current display driver, because the system cannot create cursors of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXCURSOR or SM_CYCURSOR value.
Before closing, an application must call the DestroyCursor function to free any system resources associated with the cursor.
OS Versions: Windows CE 1.0 and later.
Link Library: Iconcurs.lib.
DestroyCursor | GetSystemMetrics | SetCursor
Send Feedback on this topic to the authors
© 2006 Microsoft Corporation. All rights reserved.