来自:Hubdog大虾的葵花宝典:
function GetFileIcon(const Filename:String; SmallIcon:Boolean):HICON;
var info:TSHFILEINFO;
Flag: Integer;
begin
if SmallIcon then Flag:=(SHGFI_SMALLICON or SHGFI_ICON)
else Flag:=(SHGFI_LARGEICON or SHGFI_ICON);
SHGetFileInfo(Pchar(Filename),0,info,Sizeof(info),Flag);
Result:=info.hIcon;
end;
顺便说一句,Hubdog大虾的葵花宝典真的很好,在
http://202.115.32.32/new-wjl/soft/searchmore.php?selecttype=编程书籍
有下载