About SetCursor?
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hello, I have an Owner-Drawn Button. I want to change the cursor when my Mouse is Over the Button, Best Wishes, Thanks.
-
Hello, I have an Owner-Drawn Button. I want to change the cursor when my Mouse is Over the Button, Best Wishes, Thanks.
Process the WM_SETCURSOR message.
BOOL CMyView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { switch(pWnd->GetDlgCtrlID()) { case IDC_BUTTON_1: SetCursor(AfxGetApp()->LoadStandardCursor(IDC_IBEAM)); or SetCursor(AfxGetApp()->LoadCursor(IDC_MY_CURSOR)); return TRUE; break; case IDC_BUTTON_2: SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS)); return TRUE; break; } return CFormView::OnSetCursor(pWnd, nHitTest, message); }