grotty, hack to get around Explorer maximising the config box.
git-svn-id: svn://svn.tartarus.org/sgt/putty@707
cda61777-01e9-0310-a592-
d414129be87e
/*
* Exports from windlg.c.
*/
/*
* Exports from windlg.c.
*/
+int defuse_showwindow(void);
int do_config (void);
int do_reconfig (HWND);
void do_defaults (char *, Config *);
int do_config (void);
int do_reconfig (HWND);
void do_defaults (char *, Config *);
+/*
+ * Null dialog procedure.
+ */
+static int CALLBACK NullDlgProc (HWND hwnd, UINT msg,
+ WPARAM wParam, LPARAM lParam) {
+ return 0;
+}
+
/* ----------------------------------------------------------------------
* Routines to self-manage the controls in a dialog box.
*/
/* ----------------------------------------------------------------------
* Routines to self-manage the controls in a dialog box.
*/
return GenericMainDlgProc (hwnd, msg, wParam, lParam, 1);
}
return GenericMainDlgProc (hwnd, msg, wParam, lParam, 1);
}
+int defuse_showwindow(void) {
+ /*
+ * Work around the fact that the app's first call to ShowWindow
+ * will ignore the default in favour of the shell-provided
+ * setting.
+ */
+ {
+ HWND hwnd;
+ hwnd = CreateDialog (hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
+ NULL, NullDlgProc);
+ ShowWindow(hwnd, SW_HIDE);
+ DestroyWindow(hwnd);
+ }
+}
+
int do_config (void) {
int ret;
int do_config (void) {
int ret;
+ /* Ensure a Maximize setting in Explorer doesn't maximise the
+ * config box. */
+ defuse_showwindow();
+
/*
* Process the command line.
*/
/*
* Process the command line.
*/