]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
1. derive wxGTK wxRadioBox from wxRadioBoxBase now, as in all other ports
[wxWidgets.git] / src / msw / control.cpp
index d0395958a37a0742d86c8f67261b0d3c50487011..70451b15901fa726b1cde5b46a6ae4d7568dce4b 100644 (file)
 // 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;