[win32] mouse leave

Started by
0 comments, last by Deception666 17 years, 5 months ago
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?
Advertisement
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.

This topic is closed to new replies.

Advertisement