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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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).
回答2:
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)