X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bae4332e74923585bc0843f70bfc11e9759c33b..efdf6afeb2bb6b79d01287acfd3334c04ea2b49d:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index d0395958a3..8b27babb06 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -361,6 +361,13 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd) wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBg, wxSOLID); 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 } return hbr;