If we use a background brush, we _must_ set a colour (fixes a bug with static labels

not showing on a panel with a black background when system colours are high-contrast)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-09-15 19:46:50 +00:00
parent c8f8427191
commit 155acb0cc9

View File

@@ -382,14 +382,15 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd)
hbr = (WXHBRUSH)brush->GetResourceHandle();
// if we use custom background, we should set foreground ourselves too
if ( !m_hasFgCol )
{
::SetTextColor(hdc, ::GetSysColor(COLOR_WINDOWTEXT));
}
//else: already set above
}
// if we use custom background, we should set foreground ourselves too
if ( hbr && !m_hasFgCol )
{
::SetTextColor(hdc, ::GetSysColor(COLOR_WINDOWTEXT));
}
//else: already set above
return hbr;
}