X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/9a30e26b7801d63e4ccfe8d36169299c09b89dff..a06a0632374ecf14aca3e0025a0a985f24fdaac4:/puttygen.c diff --git a/puttygen.c b/puttygen.c index 42af3976..d85f4cce 100644 --- a/puttygen.c +++ b/puttygen.c @@ -14,6 +14,10 @@ #include "ssh.h" #include "winstuff.h" +#ifdef MSVC4 +#define ICON_BIG 1 +#endif + #define WM_DONEKEY (WM_XUSER + 1) #define DEFAULT_KEYSIZE 1024 @@ -293,7 +297,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg, return 0; case 101: EnableWindow(hwnd, 0); - DialogBox(hinst, MAKEINTRESOURCE(214), NULL, LicenceProc); + DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, LicenceProc); EnableWindow(hwnd, 1); SetActiveWindow(hwnd); return 0; @@ -813,6 +817,8 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, */ } requested_help = FALSE; + SendMessage(hwnd, WM_SETICON, (WPARAM) ICON_BIG, + (LPARAM) LoadIcon(hinst, MAKEINTRESOURCE(200))); state = smalloc(sizeof(*state)); state->generation_thread_exists = FALSE; @@ -1029,7 +1035,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, break; case IDC_ABOUT: EnableWindow(hwnd, 0); - DialogBox(hinst, MAKEINTRESOURCE(213), NULL, AboutProc); + DialogBox(hinst, MAKEINTRESOURCE(213), hwnd, AboutProc); EnableWindow(hwnd, 1); SetActiveWindow(hwnd); return 0; @@ -1044,6 +1050,9 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, } return 0; case IDC_GENERATE: + if (HIWORD(wParam) != BN_CLICKED && + HIWORD(wParam) != BN_DOUBLECLICKED) + break; state = (struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA); if (!state->generation_thread_exists) {