Reputation: 347
I have a CListCtrl containings about 2500 differents elements consisting of a 48x48 icon and text.
Due to the amount of data I implemented it as a virtual list providing
ON_NOTIFY(LVN_GETDISPINFO, IDC_LST_ICONS, &CWGDIconSearchDlg::OnLvnGetdispinfoLstIcons)
ON_NOTIFY(LVN_ODFINDITEM, IDC_LST_ICONS, &CWGDIconSearchDlg::OnLvnOdfinditemLstIcons)
My problem is when I change list content these callback get never called.
How can I force it?
Upvotes: 4
Views: 2385
Reputation: 50912
Windows cannot know that you have changed an item in virtual list.
In order to trigger a redraw of your CListCtrl, you must call yourcontrol.Invalidate()
which will trigger a repaint of your control.
Upvotes: 5