用户登录
用户注册

分享至

删除文档wordvc

  • 作者: 比尔盖茨svip
  • 来源: 51数据库
  • 2020-04-21

1.vc中有什么命令是删除文件的

WINAPI中提供有 DeleteFile()函数: HRESULT DeleteFile([in,string]LPCWSTR wsFile); Deletes the given file from the destination site. wsFile---Address of a null-terminated string that contains the name of the file to delete. --------------------------------------------------------------。

2.VC删除当前文件夹指定文件

删除文件可以使用API涵数

DeleteFile()

例如:

CString StrDestFile="C:\\删除文件.ini";

if(::DeleteFile(StrDestFile))

MessageBox("删除文件成功");

else

MessageBox("删除文件失败");

}

我们可以先获取到当前文件夹的目录,

可以用GetCurrentDirectory();

然后在删除里面的文件利用DeleteFile();

以后遇到不懂的欢迎百度给我留言,我只擅长Win32 平台下

转载请注明出处51数据库 » 删除文档wordvc

软件
前端设计
程序设计
Java相关