]> git.saurik.com Git - wxWidgets.git/commitdiff
part of patch [ 649438 ] Bug fixes from Netscape/AOL
authorRyan Norton <wxprojects@comcast.net>
Fri, 19 Nov 2004 07:46:34 +0000 (07:46 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 19 Nov 2004 07:46:34 +0000 (07:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/combobox.h
src/msw/combobox.cpp

index 49415f636a45437fcda5fa69946138831af68b83..5d1a96acb17143195b2cd32b0e1824d83cd9ae57 100644 (file)
@@ -94,6 +94,8 @@ public:
     virtual void Remove(long from, long to);
     virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
     virtual void SetSelection(long from, long to);
+    virtual int GetSelection() const;
+    virtual void GetSelection(long* from, long* to) const;
     virtual void SetEditable(bool editable);
     virtual void Clear() { wxChoice::Clear(); m_selectionOld = -1; }
 
index 73c68526607c3c38385e5e69307c1421efddea26..202dd9de97963a92e2f20d01b34cfdde7052fd00 100644 (file)
@@ -607,5 +607,19 @@ void wxComboBox::SetSelection(long from, long to)
     }
 }
 
+void wxComboBox::GetSelection(long* from, long* to) const
+{
+    DWORD dwStart, dwEnd;
+    ::SendMessage(GetHwnd(), CB_GETEDITSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
+
+    *from = dwStart;
+    *to = dwEnd;
+}
+
+int wxComboBox::GetSelection() const
+{   
+    return wxChoice::GetSelection();    
+}
+
 #endif // wxUSE_COMBOBOX