After 2 years of too much work and some idle sabatic months, I'm back at using Lazarus and my fav Object Pascal. I'm doing a project and I'm trying to do things the right way.
After some research I got a handle to an image list containing the icons used in the Windows Explorer shell for drives, folders, computer, etc.:
handle := SHGetFileInfo('', 0, shelldriveinfo, SizeOf(shelldriveinfo), SHGFI_ICON or SHGFI_SMALLICON or SHGFI_SYSICONINDEX)
Later I'll get the index of the icon of each path or drive, but I am not sure how to access the icon data without making it somewhat cumbersome, and for some efficiency and simplicity, my components (combobox, treeview, etc.) would rather use a TImageList.
So, how can I somehow convert the handle (HImageList) and use it as the component.ImageList property? Direct assigment would be preferred, but copying the shell icons to my own created TImageList would also be cool.
(Btw tried a simple TImageList(handle) and got a SigSegv with VirtualTreeView)