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
// ----------------------------------------------------------------------------
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
// 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();