Tuesday, December 16, 2008

restoring minimized window position

In CPersist::LoadWnd, before SetWindowPlacement, add:

if (!(Options & NO_MINIMIZE))
wp.flags = WPF_SETMINPOSITION;

Possibly the reason this isn't enabled by default is because if the screen resolution is reduced after exiting the application, the next time the application runs, minimized windows that would otherwise be off-screen are moved to the top left corner of the screen.

No comments: