if (createview(pcontext, afx_idw_pane_first) == null)
return false;
}
return true;
}
cwnd* cframewnd::createview(ccreatecontext* pcontext, uint nid)
{
cwnd* pview = (cwnd*)pcontext->m_pnewviewclass->createobject();
if (pview == null)
{
return null;
}
assert_kindof(cwnd, pview);
if (!pview->create(null, null, afx_ws_default_view,
crect(0,0,0,0), this, nid, pcontext))
{
return null; // can't continue without a view
}
if (afxdata.bwin4 && (pview->getexstyle() & ws_ex_clientedge))
{
modifystyleex(ws_ex_clientedge, 0, swp_framechanged);
}
return pview;
}
在文档模板的opendocumentfile函数发生了如下的调用: