简体   繁体   English

检测窗口何时停止移动?

[英]Detect when a Window has stopped moving?

Does anyone know how to detect if a Win32(c++) window has stopped moving? 有谁知道如何检测Win32(c ++)窗口是否已停止移动?

WM_MOVE detects when the window is moving, but how does one detect when it has stopped moving? WM_MOVE检测窗口何时移动,但是如何检测窗口何时停止移动?

The windows message you wish to handle is WM_EXITSIZEMOVE . 您要处理的Windows消息是WM_EXITSIZEMOVE

WM_EXITSIZEMOVE message (Windows) @ MSDN WM_EXITSIZEMOVE消息(Windows)@ MSDN

Depending on what you wish to accomplish, there's also the possibility that you might be better served by reacting to WM_NCLBUTTONUP , which is sent when the mouse button is released in the non-client areas of a window, such as the title bar of any window with a caption, border chrome, etc. 根据您希望完成的任务,还可能通过对WM_NCLBUTTONUP作出反应来提供更好的服务, WM_NCLBUTTONUP是在窗口的非客户区域(例如任何窗口的标题栏)中释放鼠标按钮时发送的带有标题,边框铬等

WM_NCLBUTTONUP message (Windows) @ MSDN WM_NCLBUTTONUP消息(Windows)@ MSDN

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM