Click to See Complete Forum and Search --> : How do I set the cursor of a CView?
hiltonc
April 23rd, 1999, 11:59 AM
How do I set the cursor of a CView to a custom cursor so that whent he user moves the mouse over it the cursor changes to the custom cursor ove the CView and normal off the CView. I have one way, but it creates a LOT of flicker.
R.K.M.
April 23rd, 1999, 02:37 PM
Handle the WM_SETCURSOR message and set it there.
Hardeep Singh
April 26th, 1999, 08:55 AM
To remove the flicker, register your window class using AfxRegisterWndClass() in the PreCreateWindow() function... make sure to set the default cursor (I think it's the 2nd parameter) to NULL.
April 26th, 1999, 09:21 AM
You can set the cursor by overriding the OnSetCursor function, all you do is add a call to SetCursor passing in a handle to a previously created cursor.
BOOL CMyView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
SetCursor (m_hWaitCursor);
return TRUE;
}
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.