Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function creates a cursor having the specified size, bit patterns, and hot spot.
HCURSOR CreateCursor( HINSTANCE hInst , int xHotSpot , int yHotSpot , int nWidth , int nHeight , CONST VOID * pvANDPlane , CONST VOID * pvXORPlane );
Parameters
Return Values
A handle to the cursor indicates success. NULL indicates failure. To get extended error information, call GetLastError.
Remarks
Hotspots should be created with positive location values. If the xHotSpotor yHotSpotparameter has a negative value, the actual hotspot has an arbitrary position.
The nWidthand nHeightparameters 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 GetSystemMetricsfunction, specifying the SM_CXCURSOR or SM_CYCURSOR value.
Before closing, an application must call the DestroyCursorfunction to free any system resources associated with the cursor.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Iconcurs.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
DestroyCursor, GetLastError, GetSystemMetrics, SetCursor