函数代码如下: BOOL CSdiDoc::OnSaveDocument(LPCTSTR lpszPathName) { // TODO: Add your specialized code here and/or call the base class CFile file; if(file.Open(lpszPathName, CFile::modeCreate|CFile::modeWrite) == FALSE) return FALSE; file.Write("Test", 5); file.Close(); return TRUE; //注释这一行,写文件不成功 //return CDocument::OnSaveDocument(lpszPathName); } 上面的代码能正确写入文件,如果返回的是最后一个行 return CDocument::OnSaveDocument(lpszPathName); 则只能创建文件,数据不能写入文件。
CDocument::OnSaveDocument(lpszPathName)的默认行为 将会把你的操作还原
最后
以上就是高兴橘子最近收集整理的关于今天早上图像处理时遇到的问题的全部内容,更多相关今天早上图像处理时遇到内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复