I am trying to change a ListView's SmallIcon set at run-time when the ListView is populated. The existing items in the ListView do not update using the new ImageList, however new items do. Anyone know a way around this?
I am currently doing this with no success:
Set lvUsers.SmallIcons = imlClassic
lvUsers.Refresh
Perhaps try doing lvUsers.ListItems(I).SmallIcon = lvUsers.ListItems(I).SmallIcon or something to that effect?
Doesn't work :(
Are you trying to change the imagelist?
I suggest doing it by:
SendMessage(lvUsers.hWnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)imlClassic.hWnd);
Thanks I'll have a go at that :)
No good :(
Edit: Oops forgot to use ByVal in the listviews hWnd, it works now :)
SendMessage lv.hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, ByVal imlClassic.hImageList
Sorry for my VB-C fusion code, but at least it got the idea across. I'm glad it's working.