]> git.saurik.com Git - wxWidgets.git/commitdiff
implemented DrawComboBoxDropButton() for classic Win32
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Jan 2005 15:36:56 +0000 (15:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Jan 2005 15:36:56 +0000 (15:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/renderer.cpp

index 9b83f013381dc6304a798416876404f54c8d9ede..49bbb5e9202f0cad89b6af038e0021f3f9afdeb2 100644 (file)
@@ -45,6 +45,11 @@ public:
 
     static wxRendererNative& Get();
 
+    virtual void DrawComboBoxDropButton(wxWindow *win,
+                                        wxDC& dc,
+                                        const wxRect& rect,
+                                        int flags = 0);
+
 private:
     DECLARE_NO_COPY_CLASS(wxRendererMSW)
 };
@@ -70,6 +75,7 @@ public:
                                   wxCoord position,
                                   wxOrientation orient,
                                   int flags = 0);
+
     virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
 
 private:
@@ -96,6 +102,27 @@ wxRendererNative& wxRendererMSW::Get()
     return s_rendererMSW;
 }
 
+void
+wxRendererMSW::DrawComboBoxDropButton(wxWindow * WXUNUSED(win),
+                                      wxDC& dc,
+                                      const wxRect& rect,
+                                      int flags)
+{
+    RECT r;
+    r.left = rect.GetLeft();
+    r.top = rect.GetTop();
+    r.bottom = rect.GetBottom();
+    r.right = rect.GetRight();
+
+    int style = DFCS_SCROLLCOMBOBOX;
+    if ( flags & wxCONTROL_DISABLED )
+        style |= DFCS_INACTIVE;
+    if ( flags & wxCONTROL_PRESSED )
+        style |= DFCS_PUSHED;
+
+    ::DrawFrameControl(GetHdcOf(dc), &r, DFC_SCROLL, style);
+}
+
 // ============================================================================
 // wxRendererXP implementation
 // ============================================================================