Редагувати

Поділитися через


Messages

The topics in this section provide the reference specifications for specific Pointer Input Messages and Notifications.

In this section

Topic Description
DM_POINTERHITTEST
Sent to a window, when pointer input is first detected, in order to determine the most probable input target for Direct Manipulation.
WM_NCPOINTERDOWN
Posted when a pointer makes contact over the non-client area of a window. The message targets the window over which the pointer makes contact. The pointer is implicitly captured to the window so that the window continues to receive input for the pointer until it breaks contact.
If a window has captured this pointer, this message is not posted. Instead, a WM_POINTERDOWN is posted to the window that has captured this pointer.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_NCPOINTERUP
Posted when a pointer that made contact over the non-client area of a window breaks contact. The message targets the window over which the pointer makes contact and the pointer is, at that point, implicitly captured to the window so that the window continues to receive input for the pointer until it breaks contact, including the WM_NCPOINTERUP notification.
If a window has captured this pointer, this message is not posted. Instead, a WM_POINTERUP is posted to the window that has captured this pointer.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_NCPOINTERUPDATE
Posted to provide an update on a pointer that made contact over the non-client area of a window or when a hovering uncaptured contact moves over the non-client area of a window. While the pointer is hovering, the message targets whichever window the pointer happens to be over. While the pointer is in contact with the surface, the pointer is implicitly captured to the window over which the pointer made contact and that window continues to receive input for the pointer until it breaks contact.
If a window has captured this pointer, this message is not posted. Instead, a WM_POINTERUPDATE is posted to the window that has captured this pointer.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_PARENTNOTIFY
Sent to a window when a significant action occurs on a descendant window. This message is now extended to include the WM_POINTERDOWN event. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place.
A window receives this message through its WindowProc function.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_POINTERACTIVATE
Sent to an inactive window when a primary pointer generates a WM_POINTERDOWN over the window. As long as the message remains unhandled, it travels up the parent window chain until it is reaches the top-level window. Applications can respond to this message to specify whether they wish to be activated.
A window receives this message through its WindowProc function.
WM_POINTERCAPTURECHANGED
Sent to a window that is losing capture of an input pointer.
A window receives this message through its WindowProc function.
WM_POINTERDEVICECHANGE
Sent to a window when there is a change in the settings of a monitor that has a digitizer attached to it. This message contains information regarding the scaling of the display mode.
WM_POINTERDEVICEINRANGE
Sent to a window when a pointer device is detected within range of an input digitizer. This message contains information regarding the device and its proximity.
WM_POINTERDEVICEOUTOFRANGE
Sent to a window when a pointer device has departed the range of an input digitizer. This message contains information regarding the device and its proximity.
WM_POINTERDOWN
Posted when a pointer makes contact over the client area of a window. This input message targets the window over which the pointer makes contact, and the pointer is implicitly captured to the window so that the window continues to receive input for the pointer until it breaks contact.
A window receives this message through its WindowProc function.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_POINTERENTER
Sent to a window when a new pointer enters detection range over the window (hover) or when an existing pointer moves within the boundaries of the window.
WM_POINTERLEAVE
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.
WM_POINTERROUTEDAWAY
Occurs on the process receiving input when the pointer input is routed to another process.
WM_POINTERROUTEDRELEASED
Sent to all processes (configured for cross-process chaining through AddContentWithCrossProcessChaining and not currently handling pointer input) ever associated with a specific pointer ID, when a WM_POINTERUP message is received on the current process.
WM_POINTERROUTEDTO
Sent when ongoing pointer input, for an existing pointer ID, transitions from one process to another across content configured for cross-process chaining (AddContentWithCrossProcessChaining).
WM_POINTERUP
Posted when a pointer that made contact over the client area of a window breaks contact. This input message targets the window over which the pointer makes contact and the pointer is, at that point, implicitly captured to the window so that the window continues to receive input messages including the WM_POINTERUP notification for the pointer until it breaks contact.
A window receives this message through its WindowProc function.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_POINTERUPDATE
Posted to provide an update on a pointer that made contact over the client area of a window or on a hovering uncaptured pointer over the client area of a window. While the pointer is hovering, the message targets whichever window the pointer happens to be over. While the pointer is in contact with the surface, the pointer is implicitly captured to the window over which the pointer made contact and that window continues to receive input for the pointer until it breaks contact.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_POINTERWHEEL
Posted to the window with foreground keyboard focus when a scroll wheel is rotated.
A window receives this message through its WindowProc function.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_POINTERHWHEEL
Posted to the window with foreground keyboard focus when a horizontal scroll wheel is rotated.
A window receives this message through its WindowProc function.
Important:
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.
WM_TOUCHHITTESTING
Sent to a window on a touch down in order to determine the most probable touch target.

Pointer Input Message Reference