X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..cdccdfabb29bd51aded9aac141e1f7bbd6c85443:/src/msw/button.cpp?ds=sidebyside diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 5cbf9002c2..6b6f67aa65 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -34,6 +34,7 @@ #include "wx/bmpbuttn.h" #include "wx/settings.h" #include "wx/dcscreen.h" + #include "wx/dcclient.h" #endif #include "wx/stockitem.h" @@ -217,7 +218,7 @@ wxSize wxButton::DoGetBestSize() const wxCoord wBtn, hBtn; - dc.GetMultiLineTextExtent(GetLabel(), &wBtn, &hBtn); + dc.GetMultiLineTextExtent(wxStripMenuCodes(GetLabel()), &wBtn, &hBtn); // add a margin -- the button is wider than just its label wBtn += 3*GetCharWidth();