The window enters a modal loop whenever you start resizing the window, the loop terminates when the mouse is released. more on this here: https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-entersizemove So I think the solution would be to handle the "WM_SYSCOMMAND" message and manually resize the window. You can also integrate this code. ( https://sourceforge.net/p/win32loopl/code/ci/default/tree/)
Anuj
