+ else
+ {
+ ::SetTextColor(hdc, ::GetSysColor(COLOR_WINDOWTEXT));
+ }
+
+ WXHBRUSH hbr = 0;
+ if ( !colBg.Ok() )
+ {
+ hbr = MSWGetBgBrush(pDC, hWnd);
+
+ // if the control doesn't have any bg colour, foreground colour will be
+ // ignored as the return value would be 0 -- so forcefully give it a
+ // non default background brush in this case
+ if ( !hbr && m_hasFgCol )
+ colBg = GetBackgroundColour();
+ }