]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Use different window procedures for the About box and the Licence box.
authorSimon Tatham <anakin@pobox.com>
Sat, 20 Feb 1999 18:12:47 +0000 (18:12 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 20 Feb 1999 18:12:47 +0000 (18:12 +0000)
Should prevent the version string masking part of the licence text ;-)

[originally from svn r51]

windlg.c

index b3bfcbff8dcbfa008d35be0797034010eb9b6fc6..306ee4ff3948e7ba741817c438c3ec3abb2a28df 100644 (file)
--- a/windlg.c
+++ b/windlg.c
@@ -357,6 +357,27 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg,
     return 0;
 }
 
+static int CALLBACK LicenceProc (HWND hwnd, UINT msg,
+                                WPARAM wParam, LPARAM lParam) {
+    switch (msg) {
+      case WM_INITDIALOG:
+       return 1;
+      case WM_COMMAND:
+       switch (LOWORD(wParam)) {
+         case IDOK:
+           abtbox = NULL;
+           DestroyWindow (hwnd);
+           return 0;
+       }
+       return 0;
+      case WM_CLOSE:
+       abtbox = NULL;
+       DestroyWindow (hwnd);
+       return 0;
+    }
+    return 0;
+}
+
 static int CALLBACK AboutProc (HWND hwnd, UINT msg,
                               WPARAM wParam, LPARAM lParam) {
     switch (msg) {
@@ -377,7 +398,7 @@ static int CALLBACK AboutProc (HWND hwnd, UINT msg,
          case IDA_LICENCE:
            EnableWindow(hwnd, 0);
            DialogBox (hinst, MAKEINTRESOURCE(IDD_LICENCEBOX),
-                      NULL, AboutProc);
+                      NULL, LicenceProc);
            EnableWindow(hwnd, 1);
            return 0;
        }