]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for Append() bug for sorted comboboxes
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Oct 1999 23:00:58 +0000 (23:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Oct 1999 23:00:58 +0000 (23:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/choice.cpp

index 84d90c83b055c06f7b5a75b3c89e745e2e1fc49e..86bf29fc1e0a86a54f7e19fcd70ed38ef9d0a3bb 100644 (file)
@@ -89,9 +89,15 @@ bool wxChoice::Create(wxWindow *parent,
 // adding/deleting items to/from the list
 // ----------------------------------------------------------------------------
 
-void wxChoice::DoAppend(const wxString& item)
+int wxChoice::DoAppend(const wxString& item)
 {
-    SendMessage(GetHwnd(), CB_ADDSTRING, 0, (LONG)item.c_str());
+    int n = (int)SendMessage(GetHwnd(), CB_ADDSTRING, 0, (LONG)item.c_str());
+    if ( n == CB_ERR )
+    {
+        wxLogLastError("SendMessage(CB_ADDSTRING)");
+    }
+
+    return n;
 }
 
 void wxChoice::Delete(int n)