Reputation: 1
Easy to reproduce problem using default MFC dialog application:
CListCtrl
class - m_listCtrl
.LVS_OWNERDATA
flag to enable virtual list view mode. Enable multiple selection and "Always show selection".OnInitDialog()
add at least one column and call m_listCtrl.SetItemCount()
to set number of items in the list to more than one.m_listCtrl.SetItemState(-1, 0, LVIS_SELECTED);
That call should deselect all entries in the list.SetItemState()
call in step (4) and notice that items don't get deselected the first time. They only get deselected the second time.Is that a bug in listview control or am I doing something wrong?
Calling m_listCtrl.SetItemState(-1, 0, LVIS_SELECTED);
should deselect all entries with the first call, but it does so only when called twice.
Upvotes: 0
Views: 333