Archived

This topic is now archived and is closed to further replies.

Floating

How do I know my mouse moved away from my dialog??

Recommended Posts

More exactly, I have an application with many dialogs, but there is one I want to notice that the mouse cursor left it. I cannot use the message ''onMouseMove'' on that dialog (it doesn''t tell me if the mouse left the dialog). Any elegant suggestion?

Share this post


Link to post
Share on other sites
Well, inside MouseMove, just get the size and position of the window... Like:

CRect rect;
GetWindowRect(&rect);

Then you just compare the mouse.x / mouse.y with rect... There might a function for that already, but it''s not hard...

I don''t know MFC that good so there might be easier ways...

/G

Share this post


Link to post
Share on other sites