]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/wince/checklst.cpp
many compilation fixes for WinCE using VC8 (it now build, although still doesn't...
[wxWidgets.git] / src / msw / wince / checklst.cpp
index d5f5274921b29debd426c1396af39ed86509239d..334f86fd51fbd5b4739cf17235f87094f0767c40 100644 (file)
@@ -185,20 +185,17 @@ void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck)
 // interface derived from wxListBox and lower classes
 // --------------------------------------------------
 
-void wxCheckListBox::Clear()
+void wxCheckListBox::DoClear()
 {
     unsigned int n = GetCount();
 
     while ( n > 0 )
     {
         n--;
-        Delete(n);
+        DoDeleteOneItem(n);
     }
 
-    m_itemsClientData.Clear();
-
-    wxCHECK_RET( n == GetCount(),
-                 _T("broken wxCheckListBox::Clear()") );
+    wxASSERT_MSG( IsEmpty(), _T("logic error in DoClear()") );
 }
 
 unsigned int wxCheckListBox::GetCount() const
@@ -267,10 +264,10 @@ int wxCheckListBox::DoInsertItems(const wxArrayStringsAdapter & items,
                                   unsigned int pos,
                                   void **clientData, wxClientDataType type)
 {
-    ListView_SetItemCount( GetHwnd(), GetCount() + count );
-
     const unsigned int count = items.GetCount();
 
+    ListView_SetItemCount( GetHwnd(), GetCount() + count );
+
     int n = wxNOT_FOUND;
 
     for( unsigned int i = 0; i < count; i++ )