X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c20e8f816b21b911e3a8ed8197c21df6ce726d6..67868c1e6c5a600fa6752e0abff13b732c8e689f:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 0729c9eea0..05c20f9b88 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -36,6 +36,7 @@ #include "wx/settings.h" #include "wx/dcscreen.h" #include "wx/dcclient.h" + #include "wx/toplevel.h" #endif #include "wx/stockitem.h" @@ -253,7 +254,7 @@ wxSize wxButton::DoGetBestSize() const wxCoord wBtn, hBtn; - dc.GetMultiLineTextExtent(wxStripMenuCodes(GetLabel()), &wBtn, &hBtn); + dc.GetMultiLineTextExtent(GetLabelText(), &wBtn, &hBtn); // add a margin -- the button is wider than just its label wBtn += 3*GetCharWidth(); @@ -849,8 +850,8 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis) COLORREF colFg = wxColourToRGB(GetForegroundColour()); DrawButtonText(hdc, &rectBtn, - (state & ODS_NOACCEL ? wxStripMenuCodes(GetLabel()) - : GetLabel()), + state & ODS_NOACCEL ? GetLabelText() + : GetLabel(), state & ODS_DISABLED ? GetSysColor(COLOR_GRAYTEXT) : colFg);