简体   繁体   中英

With my global hook installed, how do I know when a window begins to move and when it stops moving?

Is there an easy way to figure this out? I guess I can use WM_MOVE to tell me when it begins by keeping a timer. If the window has not received a WM_MOVE message within the last 2 seconds, then I know that it has just begun to move. Then I set another timer and wait for their not to be a message within a period of time (2 seconds). If nothing is received, then I can be confident that the window move has finished. Is this the right way to go about this?

如果您可以看到WM_MOVE消息,那么您也可以看到WM_ENTERSIZEMOVEWM_EXITSIZEMOVE消息。

移动开始时该窗口将收到WM_ENTERSIZEMOVE消息,结束时将接收WM_EXITSIZEMOVE消息。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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