pframe->destroywindow();
return null;
}
m_nuntitledcount++;
}
else
{
// 打开一个已经存在的文件
cwaitcursor wait;
if (!pdocument->onopendocument(lpszpathname))
{
// user has be alerted to what failed in onopendocument
trace0("cdocument::onopendocument returned false.\n");
pframe->destroywindow();
return null;
}
pdocument->setpathname(lpszpathname);
}
initialupdateframe(pframe, pdocument, bmakevisible);
return pdocument;
}