CWinApp::LoadOEMCursor

加载 nIDCursor指定的Windows预定义的光标资源。

HCURSOR LoadOEMCursor(
   UINT nIDCursor 
) const;

参数

  • nIDCursor
    指定预定义的Windows光标的 OCR_ 清单常数标识符。 必须在能够访问 #include <afxwin.h> 之前具有 #define OEMRESOURCE 到WINDOWS.H.的 OCR_ 常数。

返回值

为光标的句柄,如果成功;否则 NULL

备注

使用 LoadOEMCursorLoadStandardCursor 成员函数访问预定义的Windows光标。

示例

// 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
HCURSOR hCursor;
// Load the predefined WIndows "size all" cursor.
hCursor = AfxGetApp()->LoadOEMCursor(OCR_SIZEALL);

要求

Header: afxwin.h

请参见

参考

CWinApp选件类

层次结构图

CWinApp::LoadCursor

CWinApp::LoadStandardCursor

LoadCursor