MFC cursor stuff
why is MFC''s cursor encapsulation of whatever so bad? Am I missing something or if you want to set the cursor in a specific window you have to change the screen cursor when it enters/leaves the client area?
If so how do you detect when the cursor leaves the client area?
I''m trying to set the cursor to something when it''s inside a viewport - made from 2 splitter windows. Is there a better way of doing this?
PS: Just another small question: how do I get a pointer to the CMainFrame class, because I need to access public member variables inside it.
thanks,
Frank
quote:
why is MFC''s cursor encapsulation of whatever so bad? Am I missing something or if you want to set the cursor in a specific window you have to change the screen cursor when it enters/leaves the client area?
It''s not, really. Either trap your WM_MOUSEMOVE messages and do your own calculations, or set up mouse event tracking for your client area and use WM_MOUSELEAVE.
quote:
I''m trying to set the cursor to something when it''s inside a viewport - made from 2 splitter windows. Is there a better way of doing this?
Doing what? If you want different cursors, you want different cursors. Use the above to do that.
quote:
PS: Just another small question: how do I get a pointer to the CMainFrame class, because I need to access public member variables inside it.
CMainFrame* pMainWnd = (CMainFrame*)AfxGetMainWnd();
-fel
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement