mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +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:
parent
5d71729cdb
commit
20bc2c1913
@ -197,6 +197,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
|||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
case IDOK:
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
EndDialog(hwnd, 1);
|
EndDialog(hwnd, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -221,6 +222,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
|
|||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
case IDOK:
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
aboutbox = NULL;
|
aboutbox = NULL;
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -253,6 +253,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
|||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
case IDOK:
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
EndDialog(hwnd, 1);
|
EndDialog(hwnd, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -292,6 +293,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
|
|||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
case IDOK:
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
EndDialog(hwnd, 1);
|
EndDialog(hwnd, 1);
|
||||||
return 0;
|
return 0;
|
||||||
case 101:
|
case 101:
|
||||||
|
3
windlg.c
3
windlg.c
@ -175,6 +175,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
|||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
case IDOK:
|
case IDOK:
|
||||||
|
case IDCANCEL:
|
||||||
EndDialog(hwnd, 1);
|
EndDialog(hwnd, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -208,7 +209,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
|
|||||||
case IDA_LICENCE:
|
case IDA_LICENCE:
|
||||||
EnableWindow(hwnd, 0);
|
EnableWindow(hwnd, 0);
|
||||||
DialogBox(hinst, MAKEINTRESOURCE(IDD_LICENCEBOX),
|
DialogBox(hinst, MAKEINTRESOURCE(IDD_LICENCEBOX),
|
||||||
NULL, LicenceProc);
|
hwnd, LicenceProc);
|
||||||
EnableWindow(hwnd, 1);
|
EnableWindow(hwnd, 1);
|
||||||
SetActiveWindow(hwnd);
|
SetActiveWindow(hwnd);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user