From 49884e3e0d6e181c6be660a538211631815902b6 Mon Sep 17 00:00:00 2001 From: "Unknown (UG)" Date: Sat, 17 Oct 1998 07:27:22 +0000 Subject: [PATCH] fixes the invalid index problem git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 2dd43b3b64..273b9a61be 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -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); -- 2.45.2