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
Expand Minimize


Loads the Windows predefined cursor resource specified by nIDCursor.

   UINT nIDCursor  
) const;


An OCR_ manifest constant identifier that specifies a predefined Windows cursor. You must have #define OEMRESOURCE before #include <afxwin.h> to gain access to the OCR_ constants in WINDOWS.H.

A handle to a cursor if successful; otherwise NULL.

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

// In the stdafx.h file, add #define OEMRESOURCE to
// include the windows.h definitions of OCR_ values.
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
HCURSOR hCursor;
// Load the predefined WIndows "size all" cursor.
hCursor = AfxGetApp()->LoadOEMCursor(OCR_SIZEALL);

Header: afxwin.h

© 2015 Microsoft