Applies to: desktop apps only
Posted to a window when the cursor leaves the client area of the window specified in a prior call to TrackMouseEvent.
A window receives this message through its WindowProc function.
#define WM_MOUSELEAVE 0x02A3
Parameters
- wParam
-
This parameter is not used and must be zero.
- lParam
-
This parameter is not used and must be zero.
Return value
If an application processes this message, it should return zero.
Remarks
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.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
- Reference
- GetCapture
- SetCapture
- TrackMouseEvent
- TRACKMOUSEEVENT
- WM_NCMOUSELEAVE
- Conceptual
- Mouse Input
Send comments about this topic to Microsoft
Build date: 3/6/2012
WM_MOUSELEAVE doesn't work as expected if the user has held the mouse button down and dragged outside your window's client area.
It works if the cursor actually enters the non-client area - such as the window border - but if the user is fast and the cursor jumps straight over, the message won't be generated until the user releases the mouse button or the cursor moves into the NCA.