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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With