don't use dangling HBRUSH

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-05-24 11:46:45 +00:00
parent 15575028ea
commit e32703a9d7

View File

@@ -802,8 +802,12 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event))
// if there is no special brush just use the solid background colour
HBRUSH hbr = (HBRUSH)m_hbrBackground;
wxBrush brush;
if ( !hbr )
hbr = GetHbrushOf(wxBrush(GetBackgroundColour()));
{
brush = wxBrush(GetBackgroundColour());
hbr = GetHbrushOf(brush);
}
::FillRect(GetHdcOf(memdc), &rc, hbr);