In an MFC application, what's the easiest way

2019-06-18 03:51发布

Should I create two CFile objects and copy one into the other character by character? Or is there something in the library that will do this for me?

2条回答
乱世女痞
2楼-- · 2019-06-18 04:31

It depends on what you want to do. There are a number of ways to copy files:

  • CopyFile()
  • CopyFileEx()
  • SHFileOperation()
  • IFileOperation (replaces SHFileOperation() in Vista)
查看更多
你好瞎i
3楼-- · 2019-06-18 04:38

I would just use the CopyFile Win32 API function, but the example code in the CFile::Open documentation shows how to copy files with CFile (using pretty much the method you suggest).

查看更多
登录 后发表回答