Remove misleading comment from wxStaticBox::PaintBackground()

We do use wxStaticBox colour for painting its background (as can be seen
with test code from #18018, for example) under MSW, so don't say that we
don't.

Also, the reasons for not doing it mentioned in the comment are either
obsolete (wxGTK3 does do it too, unlike wxGTK2) or lost (the link to the
mailing list message doesn't work any longer and can't be recovered).

Closes #17913.
This commit is contained in:
Vadim Zeitlin
2017-12-07 18:49:59 +01:00
parent 2f19014d71
commit 23caf6fe00

View File

@@ -374,14 +374,6 @@ WXHRGN wxStaticBox::MSWGetRegionWithoutChildren()
// do anything in such case)
void wxStaticBox::PaintBackground(wxDC& dc, const RECT& rc)
{
// note that we do not use the box background colour here, it shouldn't
// apply to its interior for several reasons:
// 1. wxGTK doesn't do it
// 2. controls inside the box don't get correct bg colour because they
// are not our children so we'd have some really ugly colour mix if
// we did it
// 3. this is backwards compatible behaviour and some people rely on it,
// see http://groups.google.com/groups?selm=4252E932.3080801%40able.es
wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
HBRUSH hbr = MSWGetBgBrush(impl->GetHDC());