if ( flags & wxCONTROL_PRESSED )
style |= DFCS_PUSHED | DFCS_FLAT;
- ::DrawFrameControl(GetHdcOf(dc), &r, DFC_SCROLL, style);
+ ::DrawFrameControl(GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())), &r, DFC_SCROLL, style);
}
void
if ( flags & wxCONTROL_CURRENT )
style |= DFCS_HOT;
- ::DrawFrameControl(GetHdcOf(dc), &r, DFC_BUTTON, style);
+ ::DrawFrameControl(GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())), &r, DFC_BUTTON, style);
}
void
RECT rc;
wxCopyRectToRECT(rect, rc);
- ::DrawFrameControl(GetHdcOf(dc), &rc, DFC_BUTTON, style);
+ ::DrawFrameControl(GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())), &rc, DFC_BUTTON, style);
}
void wxRendererMSW::DrawFocusRect(wxWindow * WXUNUSED(win),
RECT rc;
wxCopyRectToRECT(rect, rc);
- ::DrawFocusRect(GetHdcOf(dc), &rc);
+ ::DrawFocusRect(GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())), &rc);
}
int wxRendererMSW::GetHeaderButtonHeight(wxWindow * WXUNUSED(win))
// initialize the struct filled with the values by Header_Layout()
RECT parentRect = { 0, 0, 100, 100 };
- WINDOWPOS wp = { 0 };
+ WINDOWPOS wp = { 0, 0, 0, 0, 0, 0, 0 };
HDLAYOUT hdl = { &parentRect, &wp };
return Header_Layout(hwndHeader, &hdl) ? wp.cy : DEFAULT_HEIGHT;
wxUxThemeEngine::Get()->DrawThemeBackground
(
hTheme,
- GetHdcOf(dc),
+ GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())),
CP_DROPDOWNBUTTON,
state,
&r,
wxUxThemeEngine::Get()->DrawThemeBackground
(
hTheme,
- GetHdcOf(dc),
+ GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())),
HP_HEADERITEM,
state,
&r,
wxUxThemeEngine::Get()->DrawThemeBackground
(
hTheme,
- GetHdcOf(dc),
+ GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())),
TVP_GLYPH,
state,
&r,
wxUxThemeEngine::Get()->DrawThemeBackground
(
hTheme,
- GetHdcOf(dc),
+ GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())),
BP_CHECKBOX,
state,
&r,
wxUxThemeEngine::Get()->DrawThemeBackground
(
hTheme,
- GetHdcOf(dc),
+ GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())),
BP_PUSHBUTTON,
state,
&r,
}
void
-wxRendererXP::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
+wxRendererXP::DrawItemSelectionRect(wxWindow *win,
wxDC& dc,
const wxRect& rect,
int flags)
}
else // !focused
{
- brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW));
+ brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
}
}
else // !selected
}
dc.SetBrush(brush);
-
- // unlike for wxRendererGeneric, on windows we _never_ want to draw
- // the outline of the rectangle:
dc.SetPen(*wxTRANSPARENT_PEN);
-
dc.DrawRectangle( rect );
+
+ if ((flags & wxCONTROL_FOCUSED) && (flags & wxCONTROL_CURRENT))
+ DrawFocusRect( win, dc, rect, flags );
}