Dmitry Timoshkov : user32: SetWindowPos() should check the final window position in screen coords before adding SWP_NOMOVE .