次の方法で共有


CWinApp::LoadOEMCursor

更新 : 2007 年 11 月

nIDCursor で指定した Windows の組み込みカーソル リソースを読み込みます。

HCURSOR LoadOEMCursor(
   UINT nIDCursor 
) const;

パラメータ

  • nIDCursor
    Windows の組み込みカーソルを指定する OCR_ 記号定数の識別子。WINDOWS.H 中の OCR_ 定数を利用するには、#include <afxwin.h> の前に #define OEMRESOURCE が必要です。

戻り値

正常終了した場合はカーソル リソースへのハンドルを返します。失敗した場合は NULL を返します。

解説

LoadOEMCursor を使う以外に、LoadStandardCursor メンバ関数を使っても 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);

必要条件

ヘッダー : afxwin.h

参照

参照

CWinApp クラス

階層図

CWinApp::LoadCursor

CWinApp::LoadStandardCursor

LoadCursor

その他の技術情報

CWinApp のメンバ