|
-
April 23rd, 1999, 11:59 AM
#1
How do I set the cursor of a CView?
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.
-
April 23rd, 1999, 02:37 PM
#2
Re: How do I set the cursor of a CView?
Handle the WM_SETCURSOR message and set it there.
-
April 26th, 1999, 08:55 AM
#3
Re: How do I set the cursor of a CView?
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
#4
Re: How do I set the cursor of a CView?
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;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|