Sent to a window when a pointer leaves detection range over the window (hover) or when a pointer moves outside the boundaries of the window.
A window receives this message through its WindowProc function.
Contains the pointer identifier and additional information. Use the following macros to retrieve this information.
- GET_POINTERID_WPARAM(wParam): the pointer identifier.
- IS_POINTER_INRANGE_WPARAM(wParam): indicates whether this message was generated by a pointer that has not left detection range. This flag is not set when the pointer leaves the detection range of the window.
- IS_POINTER_INCONTACT_WPARAM(wParam): a flag that indicates whether this message was generated by a pointer that is in contact. This flag is not set for a pointer in detection range (hover).
Contains the point location of the pointer.Note Because the pointer may make contact with the device over a non-trivial area, this point location may be a simplification of a more complex pointer area. Whenever possible, an application should use the complete pointer area information instead of the point location.
Use the following macros to retrieve the physical screen coordinates of the point.
If an application processes this message, it should return zero.
If the application does not process this message, it should call DefWindowProc.
The WM_POINTERLEAVE notification can be used by a window to change mode or stop any feedback to the user while the pointer is over the window surface.
This notification is only sent to the window that is receiving input for the pointer. The following table lists some of the situations in which this notification is sent.
|Action||Flags Set||Notifications Sent To|
|A hovering pointer crosses window boundaries.||IS_POINTER_INRANGE_WPARAM||Window outside of whose boundary the pointer moved.|
|A pointer goes out of detection range.||N/A||Window for which the pointer leaves detection range.|
If contact is maintained with the input digitizer and the pointer moves outside the window, WM_POINTERLEAVE is not generated. WM_POINTERLEAVE is generated only when a hovering pointer crosses window boundaries or contact is terminated.
WM_POINTERLEAVE is posted to the posted message queue if the input is originated from a mouse device.
Minimum supported client
|Windows 8 [desktop apps only]|
Minimum supported server
|Windows Server 2012 [desktop apps only]|