You both are just doing milestones on improvements of the shell controls, are you aware?
@wp: the icon thing within the SLVCustomDrawSubItem basically works fine
I still need to adapt the ShellCtrls.pas as mentioned, but if the BeginUpdate/EndUpdtes is not implemented here yet, i don't doubt about the effect.
First back to the treeview (my first pain), topic "AddIcon" only for the moment:
meanwhile i thought about, what would be effect if we query on the initial value (-1) before doing the AddIcon.
@GetMen: Then i tried again the VDT sample and verified (display of listimage count in the caption) that indeed it behaved correctly. After some srolling up and down (all getData done) the counter did reach the maxium number of objects within the folder ...... but no longer increased above..
I looked inside the source and saw that you did exactly that (query on -1 as condition for the AddIcon steps). The clue is not the clear of the listview. It is this if-condition.
@wp, would you like to verify within your last sample?
At the beginning of STVGetImageIndex add:
fMain.Caption := ilSTV.Count.ToString;
if Node.ImageIndex > -1 then exit; // Probably: -1 seems to be the initial value of the node (no need to set i explicitely?
Try it with and without this if-condition and iterate along folders. Look at the results.
So we have for now at least a working version of the treeview with icons, and without havng 5 million entries in the imagelist after an hour