Редагувати

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


WM_POINTERCAPTURECHANGED message

Sent to a window that is losing capture of an input pointer.

A window receives this message through its WindowProc function.

#define WM_POINTERCAPTURECHANGED           0x024C

Parameters

wParam

Contains information about the input pointer that is being lost. Use GET_POINTERID_WPARAM to get the pointer ID.

lParam

Contains a handle to the window that is capturing the input pointer. This value can be NULL if the pointer is no longer being captured by the window.

If this message is generated from internal processing, the value can be the handle of the window receiving the message.

Return value

If an application processes this message, it should return zero.

If the application does not process this message, it should call DefWindowProc.

Remarks

A window should use this notification to stop processing subsequent messages and initiate any cleanup required for the pointer being lost. Processing of gestures associated with the pointer should also be terminated (for example, by calling StopInteractionContext) and remaining contacts re-associated with the window.

Typically, if a window receives the WM_POINTERCAPTURECHANGED notification, no subsequent notifications related to the input pointer are received. Because of this, do not depend on paired notifications such as WM_POINTERENTER and WM_POINTERLEAVE.

WM_POINTERCAPTURECHANGED does not include POINTER_INFO data. Other than the POINTER_FLAG_CAPTURECHANGED flag being set, the data returned by GetPointerInfo (or any variant) is identical to that returned prior to the notification.

If the application does not process this notification, DefWindowProc may generate one or more WM_GESTURE messages or, if a gesture is not recognized, DefWindowProc may generate mouse input.

If an application selectively consumes some pointer input and passes the rest to DefWindowProc, the resulting behavior is undefined.

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Messages