]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/stattext.cpp
Fix for ambiguities which happen in STL=1 mode under DigitalMars C++.
[wxWidgets.git] / src / msw / stattext.cpp
index 518a7677fd302eca867ac1419f708a332f5a8119..466fb5484d981a815ee5523f67e20a60a6081e22 100644 (file)
@@ -135,6 +135,14 @@ WXHBRUSH wxStaticText::DoMSWControlColor(WXHDC pDC, wxColour colBg)
     if (!hbr && m_hasFgCol)
     {
         hbr = MSWGetBgBrushForChild(pDC, this);
+        if (!hbr)
+        {
+            HDC hdc = (HDC)pDC;
+            wxColour bg = GetBackgroundColour();
+            ::SetBkColor(hdc, wxColourToRGB(bg));
+            wxBrush *brush = wxTheBrushList->FindOrCreateBrush(bg, wxSOLID);
+            hbr = (WXHBRUSH)brush->GetResourceHandle();
+        }
     }
     return hbr;
 }