views:

26

answers:

1

Using CWnd::ShowWindow(SW_SHOWMAXIMIZED) maximizes my app window as expected.

However, when clicking the restore button on the app (or double clicking the title-bar), the restored size is the same size as the maximized window, which is confusing for the user.

Using this alternative code has the same problem:

WINDOWPLACEMENT wndpl;
GetWindowPlacement(&wndpl);
wndpl.showCmd = SW_SHOWMAXIMIZED;
SetWindowPlacement(&wndpl);

How can I keep the default un-maximized size when restoring.

A: 

All information are in the file with extension .RC. I never used a Maximize/Restore procedures though you should look for a 'DIALOGEX' for the same window. You can change it using any editor (notepad, ultraedit etc.)

Sunscreen