是否可以检查窗口的 X/Y 位置何时发生变化?此外,是否可以检查窗口宽度/高度是否也发生了变化。
问问题
390 次
2 回答
1
As already answered, you can handle WM_SIZE and WM_MOVE. But you can also intercept the messages before they have any effect by checking WM_WINDOWPOSCHANGING (except in the case where a call to SetWindowPos passes SWP_NOSENDCHANGING - but that is usually deliberate and completely under your control). This message is useful for cleanly handling window size/position restrictions or doing window snapping. If you force stuff to happen during WM_SIZE or WM_MOVE you will get flickering etc.
于 2012-07-29T23:58:56.837 回答