+
+// ============================================================================
+// wxRendererMSWBase implementation
+// ============================================================================
+
+void wxRendererMSWBase::DrawFocusRect(wxWindow * WXUNUSED(win),
+ wxDC& dc,
+ const wxRect& rect,
+ int WXUNUSED(flags))
+{
+ RECT rc;
+ wxCopyRectToRECT(rect, rc);
+
+ ::DrawFocusRect(GetHdcOf(dc.GetTempHDC()), &rc);
+}
+
+void wxRendererMSWBase::DrawItemSelectionRect(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ wxBrush brush;
+ if ( flags & wxCONTROL_SELECTED )
+ {
+ if ( flags & wxCONTROL_FOCUSED )
+ {
+ brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
+ }
+ else // !focused
+ {
+ brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+ }
+ }
+ else // !selected
+ {
+ brush = *wxTRANSPARENT_BRUSH;
+ }
+
+ dc.SetBrush(brush);
+ dc.SetPen(*wxTRANSPARENT_PEN);
+ dc.DrawRectangle( rect );
+
+ if ((flags & wxCONTROL_FOCUSED) && (flags & wxCONTROL_CURRENT))
+ DrawFocusRect( win, dc, rect, flags );
+}
+
+void wxRendererMSWBase::DrawChoice(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ DrawComboBox(win, dc, rect, flags);
+}
+
+void wxRendererMSWBase::DrawComboBox(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ // Draw the main part of the control same as TextCtrl
+ DrawTextCtrl(win, dc, rect, flags);
+
+ // Draw the button inside the border, on the right side
+ wxRect br(rect);
+ br.height -= 2;
+ br.x += br.width - br.height - 1;
+ br.width = br.height;
+ br.y += 1;
+
+ DrawComboBoxDropButton(win, dc, br, flags);
+}
+