X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c33522fca7cddc441a316f5b9fb50d7685435ba..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/colordlg.cpp?ds=sidebyside diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index f369f4762b..688ca17380 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -27,6 +27,7 @@ #if wxUSE_COLOURDLG && !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) #include "wx/colordlg.h" +#include "wx/testing.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/dialog.h" - #include "wx/cmndata.h" #include "wx/math.h" #endif @@ -81,7 +80,7 @@ wxColourDialogHookProc(HWND hwnd, const wxString title = dialog->GetTitle(); if ( !title.empty() ) - ::SetWindowText(hwnd, title.wx_str()); + ::SetWindowText(hwnd, title.t_str()); dialog->MSWOnInitDone((WXHWND)hwnd); } @@ -116,6 +115,8 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) int wxColourDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + // initialize the struct used by Windows CHOOSECOLOR chooseColorStruct; memset(&chooseColorStruct, 0, sizeof(CHOOSECOLOR)); @@ -152,7 +153,9 @@ int wxColourDialog::ShowModal() // occurred const DWORD err = CommDlgExtendedError(); if ( err ) + { wxLogError(_("Colour selection dialog failed with error %0lx."), err); + } return wxID_CANCEL; }