본문 바로가기

Windows/MFC

SetCursor 커서 가져오기

// 커서를 가져오기 위해서 준비
wchar_t szWindowsDir[MAX_PATH*2];
GetWindowsDirectory(szWindowsDir ,MAX_PATH*2);
wcscat_s(szWindowsDir,L"\\Winhlp32.exe");
HMODULE hModule = LoadLibrary(szWindowsDir);

// 커서를 가져오고
if (hModule){
    m_hHyperCursor = ::LoadCursor(hModule, MAKEINTRESOURCE(106));
}

this->SetCursor(m_hHyperCursor);

//free the module
if (hModule)
    FreeLibrary(hModule);

'Windows > MFC' 카테고리의 다른 글

Run CHM  (0) 2013.10.02
Create CHM file  (0) 2013.10.02
autorun 실행 script  (0) 2013.10.02
template  (0) 2013.10.02
dll 생성 AFX_EXT_CLASS  (0) 2013.10.02