]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
Disable final failing wxWebView test. It fails on the buildbot but not locally.
[wxWidgets.git] / src / msw / control.cpp
index c573e4a29a4f497e770a5a3a1e7aa5dcab2dccfa..0d937c901693da522a0c4d9933bcd6c388336a18 100644 (file)
@@ -365,9 +365,10 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd)
     HDC hdc = (HDC)pDC;
 
     WXHBRUSH hbr = 0;
-    if ( !colBg.Ok() )
+    if ( !colBg.IsOk() )
     {
-        hbr = MSWGetBgBrush(pDC, hWnd);
+        if ( wxWindow *win = wxFindWinFromHandle(hWnd) )
+            hbr = win->MSWGetBgBrush(pDC);
 
         // 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
@@ -379,7 +380,7 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd)
     // use the background colour override if a valid colour is given: this is
     // used when the control is disabled to grey it out and also if colBg was
     // set just above
-    if ( colBg.Ok() )
+    if ( colBg.IsOk() )
     {
         wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBg);
         hbr = (WXHBRUSH)brush->GetResourceHandle();