X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4adf63ba347a0558607dcb7877182c2412f8b8c..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/msw/checkbox.cpp?ds=sidebyside diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 281861d855..02a5a495c5 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -34,6 +34,7 @@ #include "wx/settings.h" #endif +#include "wx/msw/dc.h" // for wxDCTemp #include "wx/msw/uxtheme.h" #include "wx/renderer.h" @@ -494,7 +495,7 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) // around it if ( isFocused ) { - if ( !::DrawText(hdc, label, label.length(), &rectLabel, + if ( !::DrawText(hdc, label.wx_str(), label.length(), &rectLabel, fmt | DT_CALCRECT) ) { wxLogLastError(_T("DrawText(DT_CALCRECT)")); @@ -506,7 +507,7 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) ::SetTextColor(hdc, ::GetSysColor(COLOR_GRAYTEXT)); } - if ( !::DrawText(hdc, label, label.length(), &rectLabel, fmt) ) + if ( !::DrawText(hdc, label.wx_str(), label.length(), &rectLabel, fmt) ) { wxLogLastError(_T("DrawText()")); }