ASerge: thanks for clarification, that had been my original assumption, but now i am clear that's useless to think any longer about treeview und set_imagelist.
wp: you did ask about the merge. I'm late today and hopefully my _attachment_ is not so far behind your recent thoughts. It's the code sample from getmen with your adaption, and for the listview the adaption which uses listview_setimagelist. Note that a separate imagelist must not be attached to the listview at the same time, Regarding the treeview nothing had been changed. ASerge gave the idea (use ownerdraw for the icons) but i had not time yet to implement that.
About the performance, i need to clarify that i'm not using the shell controls but, file system oriented, Searchrec, custom treeview and for the listview, ownerdatafetch (OnData, virtual approach). So myself i have no performance problems und simply the need to fetch system icons for the treeview correctly according to the Lazarus concepts, and hopefully not slower than before.
Regarding the shell controls: we did speak about them because that icon stuff mostly is discussed around thiese controls, but using treeview or shell treeview doesn't make any difference in this respect.
About the BeginUpdate / EndUpdate (resp. LockWindowUpdate & co) - yes absolutely, if this is not implemented in the shell controls yet, it should urgently, because this does a big deal. Actually i need to focus onto the most hindering issues forrced by component incompatibilities; next will be PageControl (replacement needed) and watch threads (argh).
getmem: many thanks for the sample! Will this trunk needed be part of the next release? I think i can see the idea behind it i(it is based on VirtualTreeview control, and so i believe by my own usage of this control that it will be really fast enough).
Abut the icon access within: same question i had but cannot answer fo rmyself: will the continuous usage of Imagelist IconAdd, when iterating maybe the same directory multiple times, let the imagelist grow and grow and grow??
Data := VDT.GetNodeData(PaintInfo.Node);
.....
FileIcon.Handle := FileInfo.hIcon;
Data^.FImageIndex := ilShell.AddIcon(FileIcon);
Data^.FImageIndex := ImageList_ReplaceIcon(ilShell.ResolutionByIndex[0].Reference.Handle, Data^.FImageIndex, FileIcon.Handle);
ImageList_Draw(ilShell.ResolutionByIndex[0].Reference.Handle, Data^.FImageIndex, PaintInfo.Canvas.Handle, R.Left + 2, R.Top + (R.Height - FileIcon.Height) div 2, ILD_TRANSPARENT);
Btw: you have a good forum here! As a newbie i'm impressed about the level of discussion and contributions.