CWnd::GetDlgCtrlID()
-
void CDialog::OnMouseMove(UINT nFlags, CPoint point) { CPoint point; CWnd *wd; GetCursorPos(&point); if( (wd = WindowFromPoint(point)) ) { SetCursor(LoadCursor(NULL, (wd->GetDlgCtrlID() == IDCANCEL) ? IDC_ARROW : IDC_WAIT)); } }
hello. i've got a lengthy op and therefore an hourglass as mouse cursor. it should stay that way while not pointing to the cancel button. i wrote the code above to accomplish this. problem: my dlg has also got a toolbar and 2 radio buttons that seem to override all this; the mouse icon is always an arrow when i point on them. can somebody help, please? Я люблю русский язикь! -
void CDialog::OnMouseMove(UINT nFlags, CPoint point) { CPoint point; CWnd *wd; GetCursorPos(&point); if( (wd = WindowFromPoint(point)) ) { SetCursor(LoadCursor(NULL, (wd->GetDlgCtrlID() == IDCANCEL) ? IDC_ARROW : IDC_WAIT)); } }
hello. i've got a lengthy op and therefore an hourglass as mouse cursor. it should stay that way while not pointing to the cancel button. i wrote the code above to accomplish this. problem: my dlg has also got a toolbar and 2 radio buttons that seem to override all this; the mouse icon is always an arrow when i point on them. can somebody help, please? Я люблю русский язикь!