The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
用 SetWindowsHookEx() 挂一个 WH_CALLWNDPROC 钩子,就可以获得所有本 Instance 里面的窗体消息。然后检测 WM_MOVING、WM_SIZING 消息,详细看 Platform SDK。或者,不用钩子,就直接检测 WM_MOVING、WM_SIZING 消息也可以,不过这样要对每个窗体分别 Subclass,而钩子只要一次性搞定即可。