X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/910484a67ddd6eac7c2ec947fc9e2e71f95abb6e..6f349458f6903083bd967f52624a5e639733ad5d:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 1470b9659c..e3372ec707 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -39,7 +39,7 @@ #include "wx/msw/private.h" -#ifdef __GNUWIN32__ +#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS) #include "wx/msw/gnuwin32/extra.h" #else #include @@ -1231,13 +1231,21 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.m_col = hdr->iSubItem; break; } + case LVN_DELETEALLITEMS: - { - eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; - // NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - event.m_itemIndex = -1; - break; - } + // what's the sense of generating a wxWin event for this when + // it's absolutely not portable? +#if 0 + eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; + event.m_itemIndex = -1; +#endif // 0 + + // return TRUE to suppress all additional LVN_DELETEITEM + // notifications - this makes deleting all items from a list ctrl + // much faster + *result = TRUE; + return TRUE; + case LVN_DELETEITEM: { eventType = wxEVT_COMMAND_LIST_DELETE_ITEM;