I have this piece of code in my Delphi app, of which I have found somewhere and elsewhere on this site.
With Delphi (on Windows OS) I use This code to load system File's ImageList:
var
SysImageList: uint;
SFI: TSHFileInfo;
SmallImages: TImageList;
List: TListView;
begin
SysImageList:=SHGetFileInfo('',0,SFI,SizeOf(TSHFileInfo),SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
if SysImageList<>0 then
begin
SmallImages.Handle:=SysImageList;
SmallImages.ShareImages:=TRUE;
List.Images := SmallImages;
end;
end;
First off, I do not know how this works. It looks like just one system icon is assigned to an item in a ListView.
Second, what would the Lazarus/FPC version look like?