WM_CAPTURECHANGED message
Applies to: desktop apps only
Sent to the window that is losing the mouse capture.
A window receives this message through its WindowProc function.
#define WM_CAPTURECHANGED 0x0215
Parameters
- wParam
-
This parameter is not used.
- lParam
-
A handle to the window gaining the mouse capture.
Return value
An application should return zero if it processes this message.
Remarks
A window receives this message even if it calls ReleaseCapture itself. An application should not attempt to set the mouse capture in response to this message.
When it receives this message, a window should redraw itself, if necessary, to reflect the new mouse-capture state.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
- Reference
- ReleaseCapture
- SetCapture
- Conceptual
- Mouse Input
Send comments about this topic to Microsoft
Build date: 3/6/2012
Community Content
Arno_S
Case when WM_CAPTURECHANGED event is not sent on release of the mouse capture.
Call of DoDragDrop function releases mouse capture without sending WM_CAPTURECHANGED message to the window that had it.
Actually, it probably does not release mouse capture. Instead, it implements its own message loop.
Mouse capture only affects which window mouse messages are addressed to when these messages are put into the message queue. Usually, after messages are read from the queue via GetMessage or PeekMessage, they are passed to DispatchMessage, which sends the messages to the windows they are addressed to. But the implementor of the message loop, like DoDragDrop, is free to process the message himself, in which case capturing the mouse does not have the desired effect.
Actually, it probably does not release mouse capture. Instead, it implements its own message loop.
Mouse capture only affects which window mouse messages are addressed to when these messages are put into the message queue. Usually, after messages are read from the queue via GetMessage or PeekMessage, they are passed to DispatchMessage, which sends the messages to the windows they are addressed to. But the implementor of the message loop, like DoDragDrop, is free to process the message himself, in which case capturing the mouse does not have the desired effect.