]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - proppage.cc
2001-01-04 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
[cygwin-apps/setup.git] / proppage.cc
index db18137d694577cd77e147cd7e47e01c1bcb15a3..c9d98433f9d342da969f74137a5590ebd71d5071 100644 (file)
@@ -19,6 +19,7 @@
 #include "proppage.h"
 #include "propsheet.h"
 #include "win32.h"
+#include "resource.h"
 
 bool PropertyPage::DoOnceForSheet = true;
 
@@ -111,6 +112,11 @@ PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam)
     case WM_INITDIALOG:
       {
        OnInit ();
+
+       // Set header title font of each internal page to MS Sans Serif, Bold, 8 Pt.
+       // This will just silently fail on the first and last pages.
+       SetDlgItemFont(IDC_STATIC_HEADER_TITLE, "MS Sans Serif", 8, FW_BOLD);
+
        // TRUE = Set focus to default control (in wParam).
        return TRUE;
        break;
@@ -130,13 +136,6 @@ PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam)
                GetOwner ()->SetHWNDFromPage (((NMHDR FAR *) lParam)->
                                              hwndFrom);
                GetOwner ()->CenterWindow ();
-               // Add a minimize box to the parent property sheet.  We do this here
-               // instead of in the sheet class mainly because it will work with either
-               // modal or modeless sheets.
-               LONG style =::GetWindowLong (((NMHDR FAR *) lParam)->hwndFrom,
-                                            GWL_STYLE);
-               ::SetWindowLong (((NMHDR FAR *) lParam)->hwndFrom, GWL_STYLE,
-                                style | WS_MINIMIZEBOX);
                DoOnceForSheet = false;
              }
 
@@ -145,19 +144,16 @@ PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam)
              {
                // Disable "Back" on first page.
                GetOwner ()->SetButtons (PSWIZB_NEXT);
-               //::PropSheet_SetWizButtons(((NMHDR FAR *) lParam)->hwndFrom, PSWIZB_NEXT);
              }
            else if (IsLast)
              {
                // Disable "Next", enable "Finish" on last page
                GetOwner ()->SetButtons (PSWIZB_BACK | PSWIZB_FINISH);
-               //::PropSheet_SetWizButtons(((NMHDR FAR *) lParam)->hwndFrom, PSWIZB_BACK | PSWIZB_FINISH);
              }
            else
              {
                // Middle page, enable both "Next" and "Back" buttons
                GetOwner ()->SetButtons (PSWIZB_BACK | PSWIZB_NEXT);
-               //::PropSheet_SetWizButtons(((NMHDR FAR *) lParam)->hwndFrom, PSWIZB_BACK | PSWIZB_NEXT);
              }
 
            OnActivate ();
@@ -202,11 +198,23 @@ PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam)
        }
       break;
     case WM_COMMAND:
-      if (cmdproc != NULL)
-       {
-         return HANDLE_WM_COMMAND (GetHWND (), wParam, lParam, cmdproc);
-       }
-      break;
+      {
+       bool retval;
+
+       retval =
+         OnMessageCmd (LOWORD (wParam), (HWND) lParam, HIWORD (wParam));
+       if (retval == true)
+         {
+           // Handled, return 0
+           SetWindowLong (GetHWND (), DWL_MSGRESULT, 0);
+           return TRUE;
+         }
+       else if (cmdproc != NULL)
+         {
+           return HANDLE_WM_COMMAND (GetHWND (), wParam, lParam, cmdproc);
+         }
+       break;
+      }
     default:
       break;
     }
This page took 0.025264 seconds and 5 git commands to generate.