]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/stattext.cpp
correct access for virtual
[wxWidgets.git] / src / msw / stattext.cpp
index 0ea485b4f716a127310f0e0ca871a1a595621642..20ae8b9c920a4bd41290c13ffacdb2119db3ee39 100644 (file)
@@ -18,6 +18,8 @@
 
 #if wxUSE_STATTEXT
 
+#include "wx/stattext.h"
+
 #ifndef WX_PRECOMP
     #include "wx/event.h"
     #include "wx/app.h"
@@ -26,7 +28,6 @@
     #include "wx/settings.h"
 #endif
 
-#include "wx/stattext.h"
 #include "wx/msw/private.h"
 
 #if wxUSE_EXTENDED_RTTI
@@ -135,8 +136,7 @@ wxSize wxStaticText::DoGetBestSize() const
     dc.SetFont(font);
 
     wxCoord widthTextMax, heightTextTotal;
-    dc.GetMultiLineTextExtent(::wxStripMenuCodes(GetLabel()),
-        &widthTextMax, &heightTextTotal);
+    dc.GetMultiLineTextExtent(GetLabelText(), &widthTextMax, &heightTextTotal);
 
 #ifdef __WXWINCE__
     if ( widthTextMax )