fix for Append() bug for sorted comboboxes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-10-01 23:00:58 +00:00
parent 83b1f35395
commit def6fb9bd8

View File

@@ -89,9 +89,15 @@ bool wxChoice::Create(wxWindow *parent,
// adding/deleting items to/from the list // 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) void wxChoice::Delete(int n)