From cc1487e53905bd534dba2099d33ac2142cec7818 Mon Sep 17 00:00:00 2001 From: Jamie Gadd Date: Mon, 24 Jul 2006 13:45:31 +0000 Subject: [PATCH] Fix toolbar background painting whem comctl32 < 6 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/tbar95.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 7a64abe8e5..317cfb1535 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -1408,8 +1408,17 @@ void wxToolBar::OnEraseBackground(wxEraseEvent& event) } #endif // wxUSE_UXTHEME - event.Skip(); - return; + // if we are transparent then paint our background ourselves + LRESULT style = ::SendMessage(GetHwnd(), TB_GETSTYLE, 0, 0L); + if ( style & TBSTYLE_TRANSPARENT ) + { + ::FillRect(hdc, &rect, ::GetSysColorBrush(COLOR_BTNFACE)); + } + else + { + // let the system do it for us + event.Skip(); + } } }