// 将鼠标文件释放到临时文件中以便读取 HRSRC hResource = FindResource(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_ANI_AIM), _T("ANI_CURSOR")); if(hResource) { HGLOBAL hg = LoadResource(GetModuleHandle(NULL), hResource); if(hg) { LPVOID pData = LockResource(hg); if(pData) { DWORD dwSize = SizeofResource(GetModuleHandle(NULL), hResource); CFile IconFile; TCHAR strTmpPath[MAX_PATH]; TCHAR strTmpFle[MAX_PATH]; if (GetTempPath(MAX_PATH, strTmpPath) && GetTempFileName(strTmpPath, _T("MASTER"), 0, strTmpFle) && IconFile.Open(strTmpFle, CFile::modeWrite | CFile::modeCreate)) { IconFile.Write(pData, dwSize); IconFile.Close(); m_strTmpCursorFileName = strTmpFle; } } } }