BOOL CMyWindow::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { const HCURSOR hCursor = ::AfxGetApp()->LoadCursor(IDC_MY_CURSOR); ASSERT(hCursor != HCURSOR(0)); SetCursor(hCursor); return TRUE; }