]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/stattext.cpp
don't generate wxEVT_CONTEXT_MENU messages for right clicks in the list control header
[wxWidgets.git] / src / msw / stattext.cpp
index e881b3f838f72fdf60a10b2759ee651329e4dba4..0ea485b4f716a127310f0e0ca871a1a595621642 100644 (file)
@@ -135,7 +135,8 @@ wxSize wxStaticText::DoGetBestSize() const
     dc.SetFont(font);
 
     wxCoord widthTextMax, heightTextTotal;
-    dc.GetMultiLineTextExtent(GetLabel(), &widthTextMax, &heightTextTotal);
+    dc.GetMultiLineTextExtent(::wxStripMenuCodes(GetLabel()),
+        &widthTextMax, &heightTextTotal);
 
 #ifdef __WXWINCE__
     if ( widthTextMax )