重载OnSetCursor函数
BOOL CTest::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (pWnd->GetDlgCtrlID() == IDC_TEST) //IDC_TEST 控件ID
{
HCURSOR hCursor = LoadCursor(NULL,IDC_HAND);
return hCursor != NULL ? (SetCursor(hCursor) != NULL) : FALSE;
}
return CDialogEx::OnSetCursor(pWnd, nHitTest, message);
}