X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2ed74b912261bd91b33affbd63acfbca4c2b371..d2eaa86b9ead7eaea0c05e9e1a803c40b671fe5d:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index fc54c0de72..c6b15c64be 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -2460,7 +2460,8 @@ void wxListCtrl::SetItemCount(long count) { wxASSERT_MSG( IsVirtual(), _T("this is for virtual controls only") ); - if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, LVSICF_NOSCROLL) ) + if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, + LVSICF_NOSCROLL | LVSICF_NOINVALIDATEALL) ) { wxLogLastError(_T("ListView_SetItemCount")); }