From f5eca4f80b3ee030d2c9fb42de1d350810815426 Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 19 May 2001 15:23:12 +0000 Subject: [PATCH] Add some spare SetForegroundWindow and SetActiveWindow calls to try to improve window behaviour. Also make the About box a subdialog of the config box instead of a separate child of the root. git-svn-id: svn://svn.tartarus.org/sgt/putty@1139 cda61777-01e9-0310-a592-d414129be87e --- windlg.c | 4 ++-- window.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/windlg.c b/windlg.c index 1e5a6322..793bb08c 100644 --- a/windlg.c +++ b/windlg.c @@ -2426,8 +2426,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, } if (msg == WM_COMMAND && LOWORD(wParam) == IDCX_ABOUT) { EnableWindow(hwnd, 0); - DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), - GetParent(hwnd), AboutProc); + DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc); EnableWindow(hwnd, 1); SetActiveWindow(hwnd); } @@ -2452,6 +2451,7 @@ void defuse_showwindow(void) hwnd = CreateDialog(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), NULL, NullDlgProc); ShowWindow(hwnd, SW_HIDE); + SetActiveWindow(hwnd); DestroyWindow(hwnd); } } diff --git a/window.c b/window.c index 9948763e..546a9172 100644 --- a/window.c +++ b/window.c @@ -574,6 +574,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) * Finally show the window! */ ShowWindow(hwnd, show); + SetForegroundWindow(hwnd); /* * Open the initial log file if there is one. -- 2.11.0