We store and reload window positions using the GetWindowPlacement
/SetWindowPlacement
API routines. This up to now worked well.
Now sometimes this fails to properly reload a maximized window: The window doesn't cover the whole work area like it should. But the window "believes" it is maximized:
- It shows a "Restore" button instead of "Maximize".
- Its
WindowState
iswsMaximized
. - Calling
GetWindowPlacement
yieldsshowCmd = SW_SHOWMAXIMIZED
.
I tried a few workarounds like calling ShowWindow(SW_SHOWMAXIMIZED)
directly or delayed with PostMessage
and assigning WindowState
but to no avail. Unfortunately I'm unable to extract a SSCCE for the issue. Maybe you have advice how to fix the issue from the mentioned symptoms without one?