]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
Changed wxRectangle to wxRect. Sorry for the bandwidth...
[wxWidgets.git] / src / msw / listbox.cpp
index 2dd43b3b649ac3e9b0aa0248b5f201d6d70b6c26..c3a7f127559d918e9901f6a76200d000db7f80a4 100644 (file)
@@ -149,7 +149,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
                        const wxValidator& validator,
                        const wxString& name)
 {
-  m_noItems = n;
+  m_noItems = 0;
   m_hWnd = 0;
   m_selected = 0;
 
@@ -227,6 +227,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
     Append(choices[ui]);
   }
 
+  /* Not needed -- done in Append
 #if wxUSE_OWNER_DRAWN
     if ( m_windowStyle & wxLB_OWNERDRAW ) {
       for (ui = 0; ui < (size_t)n; ui++) {
@@ -238,6 +239,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
       }
     }
 #endif
+*/
 
   if ( (m_windowStyle & wxLB_MULTIPLE) == 0 )
     SendMessage(hwnd, LB_SETCURSEL, 0, 0);
@@ -294,7 +296,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);