|
Borland C ++ Builder FAQ
|
||
| The content | The last update: 12/12/2008 | |
|
How to place a file in a basket? The author: OlegGG Example of the function implementing removal: #include <Shellapi.h>
...
bool PutFileToRecycle (AnsiString filename)
{
SHFILEOPSTRUCTA SHF;
SHF.hwnd = Application-> Handle;
SHF.wFunc = FO_DELETE;
SHF.pFrom = filename.c_str ();
SHF.fFlags = FOF_SILENT + FOF_ALLOWUNDO;
return (SHFileOperationA (SHF) == 0);
}
|