]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
Include wx/window.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / src / msw / button.cpp
index 5cbf9002c2d019e8f9e3e451a41809734caf73a7..6b6f67aa651b4d7350a33a91949ee7df7ba7cafa 100644 (file)
@@ -34,6 +34,7 @@
     #include "wx/bmpbuttn.h"
     #include "wx/settings.h"
     #include "wx/dcscreen.h"
     #include "wx/bmpbuttn.h"
     #include "wx/settings.h"
     #include "wx/dcscreen.h"
+    #include "wx/dcclient.h"
 #endif
 
 #include "wx/stockitem.h"
 #endif
 
 #include "wx/stockitem.h"
@@ -217,7 +218,7 @@ wxSize wxButton::DoGetBestSize() const
 
     wxCoord wBtn,
             hBtn;
 
     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();
 
     // add a margin -- the button is wider than just its label
     wBtn += 3*GetCharWidth();