BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//创建一个静态分栏窗口,分为一行二列
if(m_wndSpliiter1.CreateStatic(this,1,2)==NULL)
return FALSE; //将CCSplitterWndView连接到0行0列窗格上
m_wndSpliiter1.CreateView(0,0,RUNTIME_CLASS(CSplitterView),CSize(600,600), pContext); if(m_wndSpliiter1.CreateStatic(&m_wndSpliiter1,2,1,WS_CHILD|WS_VISIBLE,
m_wndSpliiter1.IdFromRowCol(0, 1))==NULL)
return FALSE; //将第0行1列再分开2行1列
//将FormView1类连接到第二个分栏对象的0行0列
m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CFormView1),CSize(200,400),pContext);
//将FormView2类连接到第二个分栏对象的1行0列
m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CFormView2),CSize(200,200),pContext);
return TRUE;
}
这是原码,CFormView1和FormView2是分别对应于两个不同的DIALOG的类,编译的时候显示ainFrm.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CFormView2::classCFormView2" (?classCFormView2@CFormView2@@2UCRuntimeClass@@B)
MainFrm.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CFormView1::classCFormView1" (?classCFormView1@CFormView1@@2UCRuntimeClass@@B)
Debug/splitter.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
求大侠赐教,为什么错了,错在什么地方,应该如何更改?多谢!!!!!
{
// TODO: Add your specialized code here and/or call the base class
//创建一个静态分栏窗口,分为一行二列
if(m_wndSpliiter1.CreateStatic(this,1,2)==NULL)
return FALSE; //将CCSplitterWndView连接到0行0列窗格上
m_wndSpliiter1.CreateView(0,0,RUNTIME_CLASS(CSplitterView),CSize(600,600), pContext); if(m_wndSpliiter1.CreateStatic(&m_wndSpliiter1,2,1,WS_CHILD|WS_VISIBLE,
m_wndSpliiter1.IdFromRowCol(0, 1))==NULL)
return FALSE; //将第0行1列再分开2行1列
//将FormView1类连接到第二个分栏对象的0行0列
m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CFormView1),CSize(200,400),pContext);
//将FormView2类连接到第二个分栏对象的1行0列
m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CFormView2),CSize(200,200),pContext);
return TRUE;
}
这是原码,CFormView1和FormView2是分别对应于两个不同的DIALOG的类,编译的时候显示ainFrm.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CFormView2::classCFormView2" (?classCFormView2@CFormView2@@2UCRuntimeClass@@B)
MainFrm.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CFormView1::classCFormView1" (?classCFormView1@CFormView1@@2UCRuntimeClass@@B)
Debug/splitter.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
求大侠赐教,为什么错了,错在什么地方,应该如何更改?多谢!!!!!
m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CFormView1),CSize(200,400),pContext);