From feb2d6d2234338b84853906aded3718d3f4ec215 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 May 2003 06:29:39 +0000 Subject: [PATCH] Prevent scrolling back to the top when calling SetItemCount again git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 6021f92654..81ab5d9f0c 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -2361,7 +2361,7 @@ void wxListCtrl::SetItemCount(long count) { wxASSERT_MSG( IsVirtual(), _T("this is for virtual controls only") ); - if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, 0) ) + if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, LVSICF_NOSCROLL) ) { wxLogLastError(_T("ListView_SetItemCount")); }