15,980
社区成员




BOOL CTestCurDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default
//MSDN - Using Cursors词条
if (nHitTest == HTCLIENT)
{
if (HCURSOR hCur = LoadCursor(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_CURSOR1)))
//if (HCURSOR hCur = LoadCursorFromFile("res\\cursor1.cur"))
{
SetCursor(hCur); //从.rc或文件中加载静态(.cur)或动态(.ani)光标
return true;
}
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}