SetSystemCursor function
Applies to: desktop apps only
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 WINAPI SetSystemCursor( __in HCURSOR hcur, __in DWORD id );
Parameters
- hcur [in]
-
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.
- id [in]
-
Type: DWORD
The system cursor to replace with the contents of hcur. This parameter can be one of the following values.
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
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Reference
- DestroyCursor
- LoadCursor
- LoadCursorFromFile
- SetCursor
- Conceptual
- Cursors
Send comments about this topic to Microsoft
Build date: 2/3/2012
Actually, you can find this line in winuser.h:
#define IDC_HELP MAKEINTRESOURCE(32651)
In addition, there are 2 more missing cursor constants in winuser.h:
32631 is a pen, and 32663 is arrow and cd, in Windows' default cursor scheme.
So, maybe you need this:
#define IDC_PEN MAKEINTRESOURCE(32631)
#define OCR_PEN 32631
#define IDC_WAITCD MAKEINTRESOURCE(32663)
#define OCR_WAITCD 32663
Note that the above identifiers "xxx_PEN" "xxx_WAITCD" is not offical and I don't know what's the offical name, who can tell me?
***Microsoft Visual Studio 2008 v9.0.30729.1 SP
- 3/4/2010
- nuclearReady
- 3/4/2010
- nuclearReady