Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » OnSetCursor w/ CExtToolControlBar and CExtMenuControlBar Collapse All
Subject Author Date
Michael Bailey Oct 6, 2006 - 2:15 PM

Hi,

I’m trying to override the default cursor for CExtToolControlBar and CExtMenuControlBar but I’m not having much luck. The cursor just flashes and goes back to the system cursor. My simple code:

BOOL CMyToolControlBarDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) {
::SetCursor(AfxGetApp()->LoadCursor(IDC_MY_CURSOR));
    return CExtToolControlBar::OnSetCursor(pWnd, nHitTest, message);
}

BOOL CMyMenuControlBarDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) {
::SetCursor(AfxGetApp()->LoadCursor(IDC_MY_CURSOR));
    return CExtMenuControlBar::OnSetCursor(pWnd, nHitTest, message);
}

Any ideas?

Thanks,
Mike


Technical Support Oct 7, 2006 - 12:58 PM

You should override the CExtControlBar::_SetCursor() internal virtual method and perform the cursor settings.