X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/59ee63e934c5e2bdc115a8b5cfc39f036acaae01..e2125bdc32ec2f09fa19433e0ee96b7a3845b69e:/src/msw/renderer.cpp diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 2a63a4b0b5..403fec6579 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -76,8 +76,13 @@ #define HSAS_SORTEDDOWN 2 #endif -#if defined(__WXWINCE__) && !defined(DFCS_FLAT) - #define DFCS_FLAT 0 +#if defined(__WXWINCE__) + #ifndef DFCS_FLAT + #define DFCS_FLAT 0 + #endif + #ifndef DFCS_MONO + #define DFCS_MONO 0 + #endif #endif #ifndef DFCS_HOT @@ -110,6 +115,7 @@ public: const wxRect& rect, int flags = 0); + virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0); private: DECLARE_NO_COPY_CLASS(wxRendererMSW) }; @@ -207,10 +213,7 @@ wxRendererMSW::DrawComboBoxDropButton(wxWindow * WXUNUSED(win), int flags) { RECT r; - r.left = rect.GetLeft(); - r.top = rect.GetTop(); - r.bottom = rect.y + rect.height; - r.right = rect.x + rect.width; + wxCopyRectToRECT(rect, r); int style = DFCS_SCROLLCOMBOBOX; if ( flags & wxCONTROL_DISABLED ) @@ -235,6 +238,8 @@ wxRendererMSW::DrawCheckBox(wxWindow * WXUNUSED(win), 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 ) @@ -272,6 +277,14 @@ wxRendererMSW::DrawPushButton(wxWindow * WXUNUSED(win), ::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); +} + // ============================================================================ // wxRendererXP implementation // ============================================================================