X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbbb6724af7ad60a59a7b8f0a07e122ce9063024..c616c2e834192db06bbef18b9404824f563e335f:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 2f56bb4e51..6b6f67aa65 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "button.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -38,6 +34,7 @@ #include "wx/bmpbuttn.h" #include "wx/settings.h" #include "wx/dcscreen.h" + #include "wx/dcclient.h" #endif #include "wx/stockitem.h" @@ -221,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();