大浪淘沙

大浪淘沙,吹尽狂沙始到金!

博客园 首页 新随笔 联系 订阅 管理
 CString strWorkAreaPath;
 char path[MAX_PATH];
 strcpy(path,"E:\\文件夹");
  SetCurrentDirectory(_T("C:\\"));
 strWorkAreaPath = path;
 
 strWorkAreaPath += '\0';
 SHFILEOPSTRUCT fileop;
 fileop.fFlags = FOF_ALLOWUNDO ;
 fileop.hwnd = NULL;
 fileop.pFrom = strWorkAreaPath;
 fileop.pTo = NULL;
 fileop.wFunc = FO_DELETE;
 fileop.fAnyOperationsAborted = TRUE;
 fileop.hNameMappings = NULL;
 fileop.lpszProgressTitle = _T("正在删除文件");
// fileop.fFlags &= ~FOF_ALLOWUNDO;
 SHFileOperation(&fileop);
posted on 2004-11-08 22:23  大浪淘沙  阅读(1695)  评论(1编辑  收藏  举报