我发现我的:
GetDocument()->OnSaveDocument(GetDocument()->m_pathname);
并没有提示说该文件已经存在,而是一声不吭地覆盖掉了。
我只好自己写了,可是怎么判断呢?请教!
GetDocument()->OnSaveDocument(GetDocument()->m_pathname);
并没有提示说该文件已经存在,而是一声不吭地覆盖掉了。
我只好自己写了,可是怎么判断呢?请教!
_stat(...)
or
_access(...)
or
FindFirstFile
{
WIN32_FIND_DATA fData; HANDLE hFile= FindFirstFile( pszName, &fData);
if (hFile!= INVALID_HANDLE_VALUE)
{
FindClose(hFile);
return TRUE;
} return FALSE;
}
CFileFind ffind;
if(ffind.FindFile((LPCTSTR)strFileName){//如果改文件存在