X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4efd805a09f66a9b0213bd8d602f773289fadeb..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/msw/colordlg.cpp diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index 7a52b05e9d..8be79f3bc8 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/modalhook.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 @@ -77,11 +76,11 @@ wxColourDialogHookProc(HWND hwnd, { CHOOSECOLOR *pCC = (CHOOSECOLOR *)lParam; wxColourDialog * const - dialog = wx_reinterpret_cast(wxColourDialog *, pCC->lCustData); + dialog = reinterpret_cast(pCC->lCustData); 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_HOOK_MODAL_DIALOG(); + // 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; }