怎样取得快捷方式的图标,并且将该图标在LISTVIEW中显示(50分)

  • 主题发起人 主题发起人 xiangqian
  • 开始时间 开始时间
X

xiangqian

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样取得快捷方式的图标,并且将该图标在LISTVIEW中显示
 
查查我发表过的文章,或许有些帮助
 
我有一个取指定文件的图标<br>function GetFileIcon(FileName: string): integer;<br>var<br>&nbsp; Thepchar: PChar;<br>&nbsp; Theicon: ticon;<br>&nbsp; Dummy:word;<br>begin<br>&nbsp; Dummy := 65535;<br>&nbsp; GetMem(Thepchar,255);<br>&nbsp; try<br>&nbsp; &nbsp; strpcopy(Thepchar,FileName);<br>&nbsp; &nbsp; Theicon := Ticon.Create;<br>&nbsp; &nbsp; Theicon.Handle := extractassociatedicon(Hinstance,Thepchar,Dummy);<br>&nbsp; &nbsp; try<br>&nbsp; &nbsp; &nbsp; Result := ImageList.AddIcon(Theicon);<br>&nbsp; &nbsp; finally<br>&nbsp; &nbsp; &nbsp; Theicon.Free;<br>&nbsp; &nbsp; end;<br>&nbsp; finally<br>&nbsp; &nbsp; FreeMem(Thepchar,255);<br>&nbsp; end;<br>end;<br>
 
感谢你们,单我没有试出来。
 
好用,我调通了。
 

Similar threads

回复
0
查看
804
不得闲
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部