MSWGetBgBrushForChild will still return NULL. Fallback to a solid
background colour in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32820
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (!hbr && m_hasFgCol)
{
hbr = MSWGetBgBrushForChild(pDC, this);
+ if (!hbr)
+ {
+ HDC hdc = (HDC)pDC;
+ wxColour bg = GetBackgroundColour();
+ ::SetBkColor(hdc, wxColourToRGB(bg));
+ wxBrush *brush = wxTheBrushList->FindOrCreateBrush(bg, wxSOLID);
+ hbr = (WXHBRUSH)brush->GetResourceHandle();
+ }
}
return hbr;
}