TShellListView中如何过滤文件类型
好象shelltreeview没有filter这样的属性,如何显示特定类型文件呢?
procedure TForm1.ShellListView1AddFolder(Sender: TObject;
AFolder: TShellFolder; var CanAdd: Boolean);
var file_type:string;
var t:boolean;
begin
if not AFolder.IsFolder then
begin
file_type:=lowercase(extractfileext(AFolder.PathName));
t:=(file_type='.wmv') or (file_type='.asf');
if t then
CanAdd:=true
else
CanAdd:=false;
end
else
CanAdd:=true;
end;