+ ::DrawFrameControl(GetHdcOf(dc.GetTempHDC()), &r, DFC_SCROLL, style);
+}
+
+void
+wxRendererMSW::DoDrawFrameControl(UINT type,
+ UINT kind,
+ wxWindow * WXUNUSED(win),
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ wxCHECK_RET( dc.GetImpl(), wxT("Invalid wxDC") );
+
+ wxRect adjustedRect = dc.GetImpl()->MSWApplyGDIPlusTransform(rect);
+
+ RECT r;
+ wxCopyRectToRECT(adjustedRect, r);
+
+ int style = kind;
+ if ( flags & wxCONTROL_CHECKED )
+ style |= DFCS_CHECKED;
+ if ( flags & wxCONTROL_DISABLED )
+ style |= DFCS_INACTIVE;
+ if ( flags & wxCONTROL_FLAT )
+ style |= DFCS_MONO;
+ if ( flags & wxCONTROL_PRESSED )
+ style |= DFCS_PUSHED;
+ if ( flags & wxCONTROL_CURRENT )
+ style |= DFCS_HOT;
+ if ( flags & wxCONTROL_UNDETERMINED )
+ // Using DFCS_BUTTON3STATE here doesn't work (as might be expected),
+ // use the following two styles to get the same look of a check box
+ // in the undetermined state.
+ style |= DFCS_INACTIVE | DFCS_CHECKED;
+
+ ::DrawFrameControl(GetHdcOf(dc.GetTempHDC()), &r, type, style);
+}
+
+void
+wxRendererMSW::DrawPushButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rectOrig,
+ int flags)
+{
+ wxRect rect(rectOrig);
+ if ( flags & wxCONTROL_ISDEFAULT )
+ {
+ // DrawFrameControl() doesn't seem to support default buttons so we
+ // have to draw the border ourselves
+ wxDCPenChanger pen(dc, *wxBLACK_PEN);
+ wxDCBrushChanger brush(dc, *wxTRANSPARENT_BRUSH);
+ dc.DrawRectangle(rect);
+ rect.Deflate(1);
+ }
+
+ DoDrawButton(DFCS_BUTTONPUSH, win, dc, rect, flags);
+}
+
+void
+wxRendererMSW::DrawTitleBarBitmap(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ wxTitleBarButton button,
+ int flags)
+{
+ UINT kind;
+ switch ( button )
+ {
+ case wxTITLEBAR_BUTTON_CLOSE:
+ kind = DFCS_CAPTIONCLOSE;
+ break;
+
+ case wxTITLEBAR_BUTTON_MAXIMIZE:
+ kind = DFCS_CAPTIONMAX;
+ break;
+
+ case wxTITLEBAR_BUTTON_ICONIZE:
+ kind = DFCS_CAPTIONMIN;
+ break;
+
+ case wxTITLEBAR_BUTTON_RESTORE:
+ kind = DFCS_CAPTIONRESTORE;
+ break;
+
+ case wxTITLEBAR_BUTTON_HELP:
+ kind = DFCS_CAPTIONHELP;
+ break;
+
+ default:
+ wxFAIL_MSG( "unsupported title bar button" );
+ return;
+ }
+
+ DoDrawFrameControl(DFC_CAPTION, kind, win, dc, rect, flags);
+}
+
+wxSize wxRendererMSW::GetCheckBoxSize(wxWindow * WXUNUSED(win))
+{
+ return wxSize(::GetSystemMetrics(SM_CXMENUCHECK),
+ ::GetSystemMetrics(SM_CYMENUCHECK));