]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/colordlg.cpp
Ensure there is valid context for DrawRectangle
[wxWidgets.git] / src / msw / colordlg.cpp
index 0b8d20706f05ec1fb910cd0c0ca760c02ac886cc..688ca17380e51d4ab41f777b304324e109434d99 100644 (file)
@@ -27,6 +27,7 @@
 #if wxUSE_COLOURDLG && !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
 
 #include "wx/colordlg.h"
 #if wxUSE_COLOURDLG && !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
 
 #include "wx/colordlg.h"
+#include "wx/testing.h"
 
 #ifndef WX_PRECOMP
     #include "wx/msw/wrapcdlg.h"
 
 #ifndef WX_PRECOMP
     #include "wx/msw/wrapcdlg.h"
@@ -34,8 +35,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
 
@@ -81,7 +80,7 @@ wxColourDialogHookProc(HWND hwnd,
 
         const wxString title = dialog->GetTitle();
         if ( !title.empty() )
 
         const wxString title = dialog->GetTitle();
         if ( !title.empty() )
-            ::SetWindowText(hwnd, title.wx_str());
+            ::SetWindowText(hwnd, title.t_str());
 
         dialog->MSWOnInitDone((WXHWND)hwnd);
     }
 
         dialog->MSWOnInitDone((WXHWND)hwnd);
     }
@@ -116,6 +115,8 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
 
 int wxColourDialog::ShowModal()
 {
 
 int wxColourDialog::ShowModal()
 {
+    WX_TESTING_SHOW_MODAL_HOOK();
+
     // initialize the struct used by Windows
     CHOOSECOLOR chooseColorStruct;
     memset(&chooseColorStruct, 0, sizeof(CHOOSECOLOR));
     // initialize the struct used by Windows
     CHOOSECOLOR chooseColorStruct;
     memset(&chooseColorStruct, 0, sizeof(CHOOSECOLOR));