]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/colordlg.cpp
Add some version checks to help compiling on OSX.
[wxWidgets.git] / src / msw / colordlg.cpp
index d95667925a9ed31fd9de7f46b414de94185492f8..788f0fae7c0a7069c5a8350c14f3f93d24a475af 100644 (file)
@@ -34,8 +34,6 @@
     #include "wx/colour.h"
     #include "wx/gdicmn.h"
     #include "wx/utils.h"
     #include "wx/colour.h"
     #include "wx/gdicmn.h"
     #include "wx/utils.h"
-    #include "wx/dialog.h"
-    #include "wx/cmndata.h"
     #include "wx/math.h"
 #endif
 
     #include "wx/math.h"
 #endif
 
@@ -77,7 +75,7 @@ wxColourDialogHookProc(HWND hwnd,
     {
         CHOOSECOLOR *pCC = (CHOOSECOLOR *)lParam;
         wxColourDialog * const
     {
         CHOOSECOLOR *pCC = (CHOOSECOLOR *)lParam;
         wxColourDialog * const
-            dialog = wx_reinterpret_cast(wxColourDialog *, pCC->lCustData);
+            dialog = reinterpret_cast<wxColourDialog *>(pCC->lCustData);
 
         const wxString title = dialog->GetTitle();
         if ( !title.empty() )
 
         const wxString title = dialog->GetTitle();
         if ( !title.empty() )
@@ -152,7 +150,9 @@ int wxColourDialog::ShowModal()
         // occurred
         const DWORD err = CommDlgExtendedError();
         if ( err )
         // occurred
         const DWORD err = CommDlgExtendedError();
         if ( err )
+        {
             wxLogError(_("Colour selection dialog failed with error %0lx."), err);
             wxLogError(_("Colour selection dialog failed with error %0lx."), err);
+        }
 
         return wxID_CANCEL;
     }
 
         return wxID_CANCEL;
     }
@@ -161,7 +161,7 @@ int wxColourDialog::ShowModal()
     // transfer the values chosen by user back into m_colourData
     for ( i = 0; i < WXSIZEOF(custColours); i++ )
     {
     // transfer the values chosen by user back into m_colourData
     for ( i = 0; i < WXSIZEOF(custColours); i++ )
     {
-      wxRGBToColour(m_colourData.GetCustomColour(i), custColours[i]);
+      wxRGBToColour(m_colourData.m_custColours[i], custColours[i]);
     }
 
     wxRGBToColour(m_colourData.GetColour(), chooseColorStruct.rgbResult);
     }
 
     wxRGBToColour(m_colourData.GetColour(), chooseColorStruct.rgbResult);