X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db5a2bff58b2dadd6c657afa57e0e723b9cab71d..9914bfbb77f48baf869b63aff58feb2b145ff4d3:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 46854f5c23..1cc9dce77e 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -303,18 +303,6 @@ wxControl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) return attrs; } -// another version for the "composite", i.e. non simple controls -/* static */ wxVisualAttributes -wxControl::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(variant)) -{ - wxVisualAttributes attrs; - attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); - attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); - attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - - return attrs; -} - // ---------------------------------------------------------------------------- // message handling // ---------------------------------------------------------------------------- @@ -379,7 +367,8 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd) WXHBRUSH hbr = 0; if ( !colBg.Ok() ) { - hbr = MSWGetBgBrush(pDC, hWnd); + if ( wxWindow *win = wxFindWinFromHandle(hWnd) ) + hbr = MSWGetBgBrush(pDC, win); // 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