Workaround for egregious window placement behavior

Windows is currently creating the main window at near-maximal size.
It used to remember the size and placement, but no longer does.

As a workaround, the initial size is set to 1150x800, which is large
enough to show all columns without scrolling even with very wide
pathnames.  With some effort this could be modified to respect the
maximum size of the monitor on which it will be displayed, so that
anyone still running at 1024x768 won't be in a bad place.

Ideally it would remember the previous size and position.  See
issue #41 for discussion.
This commit is contained in:
Andy McFadden 2021-04-18 17:06:01 -07:00
parent 9de0b42147
commit 0a317cb0e7
2 changed files with 3 additions and 0 deletions

View File

@ -311,6 +311,8 @@ BOOL MainWindow::PreCreateWindow(CREATESTRUCT& cs)
BOOL res = CFrameWnd::PreCreateWindow(cs);
cs.dwExStyle &= ~(WS_EX_CLIENTEDGE);
cs.cx = 1150;
cs.cy = 800;
// This changes the window class name to a value that the installer can
// detect. This allows us to prevent installation while CiderPress is

View File

@ -47,6 +47,7 @@ MyApp::MyApp() : CWinAppEx()
LOGI("Leak detection enabled");
#endif
//EnableLoadWindowPlacement(true);
EnableHtmlHelp();
}