This is a Windows error. You need to call SetWindowPos(hwnd, 0, x, y, width, height, 0) on WM_MOVING . The coordinates for the set are given to you in lParam , which is RECT* .
Please note that this will activate the window in which the property is located and disconnect the owner, which you do not want (and SWP_NOACTIVATE also does not work).
To avoid this, you need to set WS_CHILD in the proper window. But install after , you created the window through SetWindowLong (), otherwise your own window will be cropped, like any child window.
And, as you probably already figured out, this only works for windows with WS_EX_TOOLWINDOW ex style. I was unable to make the paused window remain deactivated with any other style combination that does not include WS_EX_TOOLWINDOW .
This is winapi for you :(
cap
source share