Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Call this member function to get the handle of a cursor, previously set with SetCursor, that is associated with a button.

HCURSOR GetCursor( ); 

A handle to a cursor image. NULL if no cursor is previously specified.

CButton myIconButton;

// Create an icon button.
myIconButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_ICON, 
   CRect(10,10,60,50), pParentWnd, 1);

// If no image is defined for the button, define the image to the 
// system arrow and question mark cursor. 
if (myIconButton.GetCursor() == NULL)
   myIconButton.SetCursor(::LoadCursor(NULL, IDC_HELP));

Header: afxwin.h

© 2015 Microsoft