1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Malcolm Rowe's UI tweak patch for About/Licence: recognise `Esc' to close

windows (PuTTY, Pageant, PuTTYgen); Licence window parent in PuTTY.

[originally from svn r4715]
This commit is contained in:
Jacob Nevins 2004-10-27 15:50:52 +00:00
parent 5d71729cdb
commit 20bc2c1913
3 changed files with 6 additions and 1 deletions

View File

@ -197,6 +197,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
EndDialog(hwnd, 1);
return 0;
}
@ -221,6 +222,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
aboutbox = NULL;
DestroyWindow(hwnd);
return 0;

View File

@ -253,6 +253,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
EndDialog(hwnd, 1);
return 0;
}
@ -292,6 +293,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
EndDialog(hwnd, 1);
return 0;
case 101:

View File

@ -175,6 +175,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
EndDialog(hwnd, 1);
return 0;
}
@ -208,7 +209,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
case IDA_LICENCE:
EnableWindow(hwnd, 0);
DialogBox(hinst, MAKEINTRESOURCE(IDD_LICENCEBOX),
NULL, LicenceProc);
hwnd, LicenceProc);
EnableWindow(hwnd, 1);
SetActiveWindow(hwnd);
return 0;