]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
don't use untyped wxList in wxXmlResource
[wxWidgets.git] / src / msw / button.cpp
index 0729c9eea0a7ff5a0b0517bfdef376d6e4c51e9d..05c20f9b8853ca86a02636de853515d965489cf6 100644 (file)
@@ -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);