X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/486fd225d4942c852b913636bdc81d9a0a27f7d5..ef3a5e0aae003c29941c7d41ed6becea4287752d:/src/msw/stattext.cpp diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index c4a61fd113..a83000876e 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -20,6 +20,8 @@ #pragma hdrstop #endif +#if wxUSE_STATTEXT + #ifndef WX_PRECOMP #include "wx/event.h" #include "wx/app.h" @@ -57,7 +59,10 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, m_windowStyle = style; - long msStyle = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ ; + long msStyle = WS_CHILD | WS_VISIBLE; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; if (m_windowStyle & wxALIGN_CENTRE) msStyle |= SS_CENTER; else if (m_windowStyle & wxALIGN_RIGHT) @@ -145,6 +150,8 @@ void wxStaticText::SetLabel(const wxString& label) if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) { DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); + + Refresh(); } } @@ -174,4 +181,4 @@ long wxStaticText::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) return wxWindow::MSWWindowProc(nMsg, wParam, lParam); } - +#endif // wxUSE_STATTEXT