Windows/MFC

SetCursor 커서 가져오기

aucd29 2013. 10. 2. 18:08
// 커서를 가져오기 위해서 준비
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);