请问 error C2447: missing function header (old-style formal list?)是什么错误?
出错代码如下:
void CMainFrame::CreateOrActivateFrame(CDocTemplate* pTemplate,CRuntimeClass* pViewClass);
{
CMDIChildWnd* pMDIActive=MDIGetActive(); //获得当前激活的子窗口
ASSERT(pMDIActive!=NULL);
CDocument* pDoc=pMDIActive->GetActiveDocument();
//获得当前激活的文档
ASSERT(pDoc!=NULL);
/*
遍历文档的视图列表,判断 pViewClass 指向的视图是否已经存在,若
以存在则激活它,否则用当前文档模版创建新视图并激活
*/
CView* pView;
POSITION pos=pDoc->GetFirstViewPosition();
while(pos!=NULL)
{
pView=pDoc->GetNextView(pos);
if(pView->IsKindOf(pViewClass))
{
pView->GetParentFrame()->ActivateFrame();
//激活pViewClass指向的视图
return;
}
}
//用当前文档模版创建新视图并激活
CMDIChildWnd* pNewFrame=(CMDIChildWnd*) (pTemplate->CreateNewFrame
(pDoc,NULL));
if(pNewFrame==NULL)
return;
ASSERT_KINDOF(CMDIChildWnd,pNewFrame);
pTemplate->InitialUpdateFrame(pNewFrame,pDoc);
MDITile(MDITILE_NORIZONTAL);
}
问题点数:20、回复次数:1Top
1 楼everandforever(Forever)回复于 2002-10-02 14:52:22 得分 20
void CMainFrame::CreateOrActivateFrame(CDocTemplate* pTemplate,CRuntimeClass* pViewClass); //这里要;干嘛?
{
Top




