tags:

views:

18

answers:

1

The form is set up to have no maximize button. When Win+D is pressed, all windows minimize including the form. When clicking on the application's taskbar entry, the form shows up but does not restore to the previous size. The form is reduced to just showing the title bar and the borders, w/o the client area.

I tried listening for WM_SIZE message's SIZE_RESTORED value, but couldn't seem to get the right size from RestoreBounds or GetWindowPlacement.

I'll try to do it the other way and look for SIZE_MINIMIZED and capture the rect, then restore from that rect on SIZE_RESTORED, when I come back.

In the meantime, any of you have an idea why the form does not restore correctly in the first place so I can apply a proper fix. Or suggest a better approach, if the proper fix is not possible.