共用方式為


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