X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a0e7e55d82e9c897c4bb1deff46967d52db29cc..f3ebbc0ac81967b5ef42414ffd753905075940dd:/src/msw/stattext.cpp diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 7eaa18b562..0ea485b4f7 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "stattext.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -123,6 +119,9 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const else msStyle |= SS_LEFT; + // this style is necessary to receive mouse events + msStyle |= SS_NOTIFY; + return msStyle; } @@ -136,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 )