CWinApp::LoadOEMCursor

HCURSOR LoadOEMCursor( UINT nIDCursor ) const;

Return Value

A handle to a cursor if successful; otherwise NULL.

Parameters

nIDCursor

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.

Remarks

Loads the Windows predefined cursor resource specified by nIDCursor.

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

Example

// In the stdafx.h file, add #define OEMRESOURCE to
// include the windows.h definitions of OCR_ values.
#define OEMRESOURCE
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions (including VB)

   HCURSOR hCursor;
   // Load the predefined WIndows "size all" cursor.
   hCursor = AfxGetApp()->LoadOEMCursor(OCR_SIZEALL);

CWinApp OverviewClass MembersHierarchy Chart

See Also   CWinApp::LoadCursor, CWinApp::LoadStandardCursor, ::LoadCursor