SetSystemCursor function (winuser.h)
Enables an application to customize the system cursors. It replaces the contents of the system cursor specified by the id parameter with the contents of the cursor specified by the hcur parameter and then destroys hcur.
Syntax
BOOL SetSystemCursor(
[in] HCURSOR hcur,
[in] DWORD id
);
Parameters
[in] hcur
Type: HCURSOR
A handle to the cursor. The function replaces the contents of the system cursor specified by id with the contents of the cursor handled by hcur.
The system destroys hcur by calling the DestroyCursor function. Therefore, hcur cannot be a cursor loaded using the LoadCursor function. To specify a cursor loaded from a resource, copy the cursor using the CopyCursor function, then pass the copy to SetSystemCursor.
[in] id
Type: DWORD
The system cursor to replace with the contents of hcur. This parameter can be one of the following values.
Value | Meaning |
---|---|
OCR_NORMAL32512 |
Normal select |
OCR_IBEAM32513 |
Text select |
OCR_WAIT32514 |
Busy |
OCR_CROSS32515 |
Precision select |
OCR_UP32516 |
Alternate select |
OCR_SIZENWSE32642 |
Diagonal resize 1 |
OCR_SIZENESW32643 |
Diagonal resize 2 |
OCR_SIZEWE32644 |
Horizontal resize |
OCR_SIZENS32645 |
Vertical resize |
OCR_SIZEALL32646 |
Move |
OCR_NO32648 |
Unavailable |
OCR_HAND32649 |
Link select |
OCR_APPSTARTING32650 |
Working in background |
Return value
Type: BOOL
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
For an application to use any of the OCR_ constants, the constant OEMRESOURCE must be defined before the Windows.h header file is included.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
See also
Conceptual
Reference