fixes the invalid index problem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Unknown (UG) 1998-10-17 07:27:22 +00:00
parent 6dd2244b9d
commit 49884e3e0d

View File

@ -294,7 +294,7 @@ void wxListBox::Append(const wxString& item)
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW ) {
wxOwnerDrawn *pNewItem = CreateItem(-1); // dummy argument
wxOwnerDrawn *pNewItem = CreateItem(index); // dummy argument
pNewItem->SetName(item);
m_aItems.Add(pNewItem);
ListBox_SetItemData(hwnd, index, pNewItem);