Collapse the table of content
Expand the table of content



Loads the Windows predefined cursor resource that lpszCursorName specifies.

      HCURSOR LoadStandardCursor(
   LPCTSTR lpszCursorName 
) const;


An IDC_ manifest constant identifier that specifies a predefined Windows cursor. These identifiers are defined in WINDOWS.H. The following list shows the possible predefined values and meanings for lpszCursorName:

  • IDC_ARROW   Standard arrow cursor

  • IDC_IBEAM   Standard text-insertion cursor

  • IDC_WAIT   Hourglass cursor used when Windows performs a time-consuming task

  • IDC_CROSS   Cross-hair cursor for selection

  • IDC_UPARROW   Arrow that points straight up

  • IDC_SIZE   Obsolete and unsupported; use IDC_SIZEALL

  • IDC_SIZEALL   A four-pointed arrow. The cursor to use to resize a window.

  • IDC_ICON   Obsolete and unsupported. Use IDC_ARROW.

  • IDC_SIZENWSE   Two-headed arrow with ends at upper left and lower right

  • IDC_SIZENESW   Two-headed arrow with ends at upper right and lower left

  • IDC_SIZEWE   Horizontal two-headed arrow

  • IDC_SIZENS   Vertical two-headed arrow

A handle to a cursor if successful; otherwise NULL.

Use the LoadStandardCursor or LoadOEMCursor member function to access the predefined Windows cursors.


HCURSOR hCursor;

// Load the predefined Windows "up arrow" cursor.
hCursor = AfxGetApp()->LoadStandardCursor(IDC_UPARROW);   


Header: afxwin.h

© 2016 Microsoft