mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Implement a much more visually appealing, but much more internally
grotty, hack to get around Explorer maximising the config box. [originally from svn r707]
This commit is contained in:
parent
3e83d75154
commit
e67f143e61
1
putty.h
1
putty.h
@ -269,6 +269,7 @@ void random_destroy_seed(void);
|
||||
/*
|
||||
* Exports from windlg.c.
|
||||
*/
|
||||
int defuse_showwindow(void);
|
||||
int do_config (void);
|
||||
int do_reconfig (HWND);
|
||||
void do_defaults (char *, Config *);
|
||||
|
23
windlg.c
23
windlg.c
@ -173,6 +173,14 @@ static int CALLBACK AboutProc (HWND hwnd, UINT msg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
@ -2297,6 +2305,21 @@ static int CALLBACK ReconfDlgProc (HWND hwnd, UINT msg,
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user