ShellListView中如何删除选定的文件夹及它的子文件夹?
hjkto 2009-12-13 10:46:57 procedure TForm1.ShellListView1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
T: TSHFileOpStruct;
begin
if key=32 then
begin
T.Wnd:=0;
T.wFunc:=FO_DELETE;
//T.fFlags := FOF_ALLOWUNDO+FOF_NOERRORUI+FOF_NORECURSION;
T.pFrom:=PChar(ShellListView1.selectedfolder.PathName);
if FileExists(ShellListView1.SelectedFolder.PathName) then
begin
DeleteFile(ShellListView1.selectedfolder.PathName);
ShellListView1.Refresh;
end
else
SHFileOperation(T);
end;
end;
上面的代码完不了,哪位帮改一下?