[code lang=”delphi”]function GetIconIndex(const AFile: string; Attrs: DWORD): integer;
var
SFI: TSHFileInfo;
begin
SHGetFileInfo(PChar(AFile), Attrs, SFI, SizeOf(TSHFileInfo),
SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES);
Result := SFI.iIcon;
end;[/code]
[tags]Delphi, API[/tags]
0 Kommentare zu “System Image Usage”