HCURSOR SetCursor( HCURSOR hCursor );
Return Value
The handle of a cursor previously associated with the button.
Parameters
hCursor
The handle of a cursor.
Remarks
Call this member function to associate a new cursor with the button.
The cursor will be automatically placed on the face of the button, centered by default. If the cursor is too large for the button, it will be clipped on either side. You can choose other alignment options, including the following:
Unlike CBitmapButton, which uses four bitmaps per button, SetCursor uses only one cursor per the button. When the button is pressed, the cursor appears to shift down and to the right.
Example
CButton myButton;
// Create an icon button.
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_ICON,
CRect(10,10,60,50), pParentWnd, 1);
// Set the image of the button to be the system arrow and
// small hourglass cursor.
myButton.SetCursor( ::LoadCursor(NULL, IDC_APPSTARTING) );
CButton Overview | Class Members | Hierarchy Chart
See Also CButton::GetCursor, CBitmapButton::LoadBitmaps, Bitmaps