为什么exe文件在执行"open"命令时会出问题?
程序基于MDI,编译连接都没问题,可运行exe文件,选择打开文件时,总是出错,错误信息为“docmgr.cpp 577"
BOOL CDocManager::DoPromptFileName(CString& fileName, UINT nIDSTitle, DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate)
{
CFileDialog dlgFile(bOpenFileDialog);
CString title;
VERIFY(title.LoadString(nIDSTitle)); //为出错行,行号为577
。。。。
}
而DoPromptFileName只在下面程序中被调用
void CDocManager::OnFileOpen()
{
// prompt the user (with all document templates)
CString newName;
if (!DoPromptFileName(newName, AFX_IDS_OPENFILE,
OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, NULL))
return; // open cancelled
AfxGetApp()->OpenDocumentFile(newName);
// if returns NULL, the user has already been alerted
}
现在即使我把我程序中Doc类下的OnOpenDocument中我加的内容全部注释掉,还是同样错误,为什么?实在不解!!!!