CStatic::SetCursor

HCURSOR SetCursor( HCURSOR hCursor );

Return Value

The handle of the cursor previously associated with the static control, or NULL if no cursor was associated with the static control.

Parameters

hCursor

Handle of the cursor to be drawn in the static control.

Remarks

Call this member function to associate a new cursor image with the static control.

The cursor will be automatically drawn in the static control. By default, it will be drawn in the upper-left corner and the static control will be resized to the size of the cursor.

You can use various window and static control styles, including the following:

Example

CStatic myStatic;

// Create a child icon static control.
myStatic.Create(_T("my static"), 
   WS_CHILD|WS_VISIBLE|SS_ICON|SS_CENTERIMAGE, CRect(10,10,150,50), 
   pParentWnd);

// Set the image of the static control to be the system arrow 
// and small hourglass cursor.
myStatic.SetCursor( ::LoadCursor(NULL, IDC_APPSTARTING) );

CStatic OverviewClass MembersHierarchy Chart

See Also   CStatic::GetCursor, STM_SETIMAGE, Cursors