如何把一个文件夹考到别的文件夹下!
解决方案 »
- 请问有没有解析windows消息的值的函数或者宏?
- CMD窗口的样式!
- 求教,急!小弟需要在点击对话框确定按钮后,实现一段在界面上图形(如菱形)自动移动的代码,可以在对话框中先设定图形的初始位置以及帧时,请各位高手赐教
- 初看DriverStudio问个问题
- 在线等待--Document和viewer之间数据传递居然丢失?
- MFC里的问题。
- 急急急!!!!请教大家?
- 请教为什么不能使用InitializeCriticalSectionAndSpinCount
- VC中制作多语言版本?
- 多重引导程序NtLdr和Boot.ini我怎么找不到?
- 熟悉VC开发平台要多长时间?
- 【菜鸟问题】请问:我想学习使用vc,之前学了《21天学通c++》,使用vc之前还要学点什么吗?
LPCTSTR lpExistingFileName,
// pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);Parameters
lpExistingFileName
Pointer to a null-terminated string that specifies the name of an existing file.
lpNewFileName
Pointer to a null-terminated string that specifies the name of the new file.
bFailIfExists
Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.
//可以改变源路径
char strDst[]="f:\\temp\0";
//设置目的路径
char strTitle[]="File copying";
//进度题头
SHFILEOPSTRUCT FileOp;
FileOp.hwnd=m_hWnd;
FileOp.wFunc=FO_COPY;
//执行文件拷贝
FileOp.pFrom=strSrc;
FileOp.pTo=strDst;
FileOp.fFlags=FOF_ALLOWUNDO;
FileOp.hNameMappings=NULL;
FileOp.lpszProgressTitle=strTitle; nOk=SHFileOperation(&FileOp);
if(nOk)
TRACE("There is an error: %d\n",nOk);
else
TRACE("SHFileOperation finished successfully\n"); if(FileOp.fAnyOperationsAborted)
TRACE("Operation was aborted!\n");