X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c9a19aabab3a878b565e6c2a5f2a3824277c4dc..55826fcf4fd863d48ac28789d99bbb5c8a8d4c7e:/src/msw/scrolbar.cpp?ds=sidebyside diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index cd25307611..fccc82bb70 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -53,6 +53,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, SetValidator(validator); #endif // wxUSE_VALIDATORS + if ((style & wxBORDER_MASK) == wxBORDER_DEFAULT) + style |= wxNO_BORDER; + SetBackgroundColour(parent->GetBackgroundColour()) ; SetForegroundColour(parent->GetForegroundColour()) ; m_windowStyle = style; @@ -82,15 +85,13 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, height = 14; } - DWORD wstyle = WS_VISIBLE | WS_CHILD; - - if ( m_windowStyle & wxCLIP_SIBLINGS ) - wstyle |= WS_CLIPSIBLINGS; + WXDWORD exStyle = 0; + WXDWORD wstyle = MSWGetStyle(style, & exStyle) ; // Now create scrollbar DWORD _direction = (style & wxHORIZONTAL) ? SBS_HORZ: SBS_VERT; - HWND scroll_bar = CreateWindowEx(MakeExtendedStyle(style), wxT("SCROLLBAR"), wxT("scrollbar"), + HWND scroll_bar = CreateWindowEx(exStyle, wxT("SCROLLBAR"), wxT("scrollbar"), _direction | wstyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL);