When I call SWP to try and move a resize a specific window. It does not move or resize.
SetWindowPos(hWndWindow, NULL, 0, 0, 500, 500, SWP_NOZORDER);
The window handle is valid. I tried both getting the handle with FindWindow
and by manually setting the handle value to the window I wanted to resize.
When I use GetWindowPlacement
, it says the window is SW_NORMAL
and not SW_MAXIMIZE.
The window style is
0x160b0000 (WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_MINMIZEBOX | WS_MAXIMIZEBOX)
and the extend style is 0x0.
I have also tried setting the window to SW_NORMAL
with ShowWindow
before calling SetWindowPos
.
SetWindowPos
and MoveWindow
both return non false values saying that they didn't fail.
Why is SetWindowPos and MoveWindow unable to move or resize this window?