]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/listctrl/listtest.cpp
Win16 version is not used any longer
[wxWidgets.git] / samples / listctrl / listtest.cpp
index eab3daf678717c107b95b551836925f988d51200..11f2dab732ff2fb3a9421e4ce4c12d893996c1ac 100644 (file)
@@ -89,8 +89,10 @@ BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
     EVT_LIST_END_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnEndLabelEdit)
     EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem)
     EVT_LIST_DELETE_ALL_ITEMS(LIST_CTRL, MyListCtrl::OnDeleteAllItems)
+#if WXWIN_COMPATIBILITY_2_4
     EVT_LIST_GET_INFO(LIST_CTRL, MyListCtrl::OnGetInfo)
     EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo)
+#endif
     EVT_LIST_ITEM_SELECTED(LIST_CTRL, MyListCtrl::OnSelected)
     EVT_LIST_ITEM_DESELECTED(LIST_CTRL, MyListCtrl::OnDeselected)
     EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
@@ -654,10 +656,12 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
 {
     wxStopWatch sw;
 
+    size_t itemCount = m_listCtrl->GetItemCount();
+
     m_listCtrl->DeleteAllItems();
 
     m_logWindow->WriteText(wxString::Format(_T("Deleting %d items took %ld ms\n"),
-                                            m_listCtrl->GetItemCount(),
+                                            itemCount,
                                             sw.Time()));
 }
 
@@ -771,6 +775,7 @@ void MyListCtrl::OnDeleteAllItems(wxListEvent& event)
     LogEvent(event, _T("OnDeleteAllItems"));
 }
 
+#if WXWIN_COMPATIBILITY_2_4
 void MyListCtrl::OnGetInfo(wxListEvent& event)
 {
     wxString msg;
@@ -803,6 +808,7 @@ void MyListCtrl::OnSetInfo(wxListEvent& event)
 {
     LogEvent(event, _T("OnSetInfo"));
 }
+#endif
 
 void MyListCtrl::OnSelected(wxListEvent& event)
 {