X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bae4332e74923585bc0843f70bfc11e9759c33b..27c78e4552aaefac9a4db0d4453eff09cdfef2ad:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index d0395958a3..70451b1590 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "control.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -361,6 +357,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;