Sign in to follow this  
Trillian

[win32] mouse leave

Recommended Posts

Hello! I want to know when the mouse leaves my window. I've looked at TrackMouseEvent but it doesn't work : I get a WM_MOUSELEAVE when my program starts and then I get no more notifications. Is there another way to know this?

Share this post


Link to post
Share on other sites
Here is what the MSDN states:

The mouse left the client area of the window specified in a prior call to TrackMouseEvent. All tracking requested by TrackMouseEvent is canceled when this message is generated. The application must call TrackMouseEvent when the mouse reenters its window if it requires further tracking of mouse hover behavior.

You need to trap the event and when the mouse moves back into the window, reset the event.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this