]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
Applied patch #877159: Joinable threads might crash app if deleted right after Wait.
[wxWidgets.git] / src / msw / listbox.cpp
index b795ef947e47a893e391a632fef923019e4743f2..80b2bb0f6fa937f979941f903a92b9752e9bfba6 100644 (file)
@@ -155,6 +155,19 @@ wxListBox::wxListBox()
     m_selected = 0;
 }
 
+wxListBox::wxListBox(wxWindow *parent,
+                     wxWindowID id,
+                     const wxPoint& pos,
+                     const wxSize& size,
+                     int n, 
+                     const wxString choices[],
+                     long style,
+                     const wxValidator& validator,
+                     const wxString& name)
+{
+    Create(parent, id, pos, size, n, choices, style, validator, name);
+}
+
 bool wxListBox::Create(wxWindow *parent,
                        wxWindowID id,
                        const wxPoint& pos,
@@ -400,7 +413,8 @@ void wxListBox::Free()
 
 void wxListBox::SetSelection(int N, bool select)
 {
-    wxCHECK_RET( N >= 0 && N < m_noItems,
+    wxCHECK_RET( N == wxNOT_FOUND || 
+                    (N >= 0 && N < m_noItems),
                  wxT("invalid index in wxListBox::SetSelection") );
 
     if ( HasMultipleSelection() )