From 52dbc7e6f826f602879a4028021d6a0c376a55c8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 11 Feb 2015 21:16:03 +0000 Subject: [PATCH] Remove obsolete checks for wxOS_WINDOWS_NT from wxMSW wxStaticText. We don't support Windows 9x any more, so there is no need to check for NT damily at run-time. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/stattext.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 3afa605e9c..fc4e6da3c6 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -75,18 +75,14 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const msStyle |= SS_LEFT; #ifdef SS_ENDELLIPSIS - // this style is necessary to receive mouse events - // Win NT and later have the SS_ENDELLIPSIS style which is useful to us: - if (wxGetOsVersion() == wxOS_WINDOWS_NT) - { - // for now, add the SS_ENDELLIPSIS style if wxST_ELLIPSIZE_END is given; - // we may need to remove it later in ::SetLabel() if the given label - // has newlines - if ( style & wxST_ELLIPSIZE_END ) - msStyle |= SS_ENDELLIPSIS; - } + // for now, add the SS_ENDELLIPSIS style if wxST_ELLIPSIZE_END is given; + // we may need to remove it later in ::SetLabel() if the given label + // has newlines + if ( style & wxST_ELLIPSIZE_END ) + msStyle |= SS_ENDELLIPSIS; #endif // SS_ENDELLIPSIS + // this style is necessary to receive mouse events msStyle |= SS_NOTIFY; return msStyle; @@ -153,8 +149,7 @@ void wxStaticText::SetLabel(const wxString& label) { #ifdef SS_ENDELLIPSIS long styleReal = ::GetWindowLong(GetHwnd(), GWL_STYLE); - if ( HasFlag(wxST_ELLIPSIZE_END) && - wxGetOsVersion() == wxOS_WINDOWS_NT ) + if ( HasFlag(wxST_ELLIPSIZE_END) ) { // adding SS_ENDELLIPSIS or SS_ENDELLIPSIS "disables" the correct // newline handling in static texts: the newlines in the labels are