Fix toolbar background painting whem comctl32 < 6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f89f6b74f2
commit
cc1487e539
@ -1408,8 +1408,17 @@ void wxToolBar::OnEraseBackground(wxEraseEvent& event)
|
|||||||
}
|
}
|
||||||
#endif // wxUSE_UXTHEME
|
#endif // wxUSE_UXTHEME
|
||||||
|
|
||||||
event.Skip();
|
// if we are transparent then paint our background ourselves
|
||||||
return;
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user