1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-14 01:28:06 -05:00

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.

[originally from svn r1139]
This commit is contained in:
Simon Tatham 2001-05-19 15:23:12 +00:00
parent 38b6d276d2
commit 7b7ec7e72e
2 changed files with 3 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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.