The message WM_CURSOR
is sent to the view class when the application is in idle mode (not busy with anything else). The answer to the message is handled to the preferred cursor. There are a number of standard cursors that are returned by the CWinApp
method LoadStandardCursor
. The global function AfxGetApp
returns a pointer to the application object (there is only one). The cursor is set in the view class by the SetCursor
Win32 API function.
CWinApp* AfxGetApp(); HCURSOR LoadStandardCursor(CString stCursorName) const; HCURSOR SetCursor(HCURSOR hCursor);
The parameter stCursorName
could be any of the following predefined constants.
|
Standard arrow cursor. |
|
Standard text-insertion cursor. |
|
Cross-hair cursor for selection. |
|
A four-pointed arrow, the cursor used to resize a window. |
|
Horizontal two-headed arrow. |
|
Vertical two-headed arrow. |
|
Two-headed arrow aimed at the upper left and lower... |