我用vs2010建立了一个ribbon工程,然后里面嵌入一个对话框,建立对话框类的时候我用的基类是Cformview,类向导会提示是否   生成 DocTemplate 资源(G) ,我选择了,最后运行程序的时候会出现一个新建提示对话框,要我选择是工程还那是那个对话框,
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
//ODO: 在此添加专用代码和/或调用基类
CRect rtMainFrame(0, 0, 0, 0);
this->GetClientRect(&rtMainFrame);

CRuntimeClass* pEmiViewClass = NULL;
pEmiViewClass = RUNTIME_CLASS(CRibbon1View);

CCreateContext context;
context.m_pNewViewClass = pEmiViewClass;
context.m_pCurrentDoc = GetActiveDocument();

CView* pNewView = NULL;
pNewView = STATIC_DOWNCAST(CView, CreateView(&context));
if (pNewView != NULL)
{
// the new view is there, but invisible and not active...
pNewView->ShowWindow(SW_SHOW);
pNewView->OnInitialUpdate();
SetActiveView(pNewView);
RecalcLayout();
}
else
{
return FALSE;
}

m_pTCView = (CRibbon1View*)pNewView;
//m_pTCView->m_pMainFrame = this;

m_pTCView->CreateTestModeView();

//CreateReportTemplateFolder(_T(""));

return TRUE; return CFrameWndEx::OnCreateClient(lpcs, pContext);
}

  还有就是 我用OnCreateClient为什么会崩溃啊