MFC cursor stuff

Started by
0 comments, last by a38750 22 years, 10 months ago
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
Advertisement
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
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

This topic is closed to new replies.

Advertisement