+ RECT rc;
+ wxCopyRectToRECT(rect, rc);
+
+ ::DrawFrameControl(GetHdcOf(dc), &rc, DFC_BUTTON, style);
+}
+
+void wxRendererMSW::DrawFocusRect(wxWindow * WXUNUSED(win),
+ wxDC& dc,
+ const wxRect& rect,
+ int WXUNUSED(flags))
+{
+ RECT rc;
+ wxCopyRectToRECT(rect, rc);
+
+ ::DrawFocusRect(GetHdcOf(dc), &rc);
+}
+
+int wxRendererMSW::GetHeaderButtonHeight(wxWindow * WXUNUSED(win))
+{
+ // some "reasonable" value returned in case of error, it doesn't really
+ // correspond to anything but it's better than returning 0
+ static const int DEFAULT_HEIGHT = 20;
+
+
+ // create a temporary header window just to get its geometry
+ HWND hwndHeader = ::CreateWindow(WC_HEADER, NULL, 0,
+ 0, 0, 0, 0, NULL, NULL, NULL, NULL);
+ if ( !hwndHeader )
+ return DEFAULT_HEIGHT;
+
+ wxON_BLOCK_EXIT1( ::DestroyWindow, hwndHeader );
+
+ // initialize the struct filled with the values by Header_Layout()
+ RECT parentRect = { 0, 0, 100, 100 };
+ WINDOWPOS wp = { 0, 0, 0, 0, 0, 0, 0 };
+ HDLAYOUT hdl = { &parentRect, &wp };
+
+ return Header_Layout(hwndHeader, &hdl) ? wp.cy : DEFAULT_HEIGHT;