1.创建2个CFormView
2.为这2个CFormView创建类,继 承CFormView,例如取名为CFormView1,CFormView2
3.在框架窗口中注册成员变量:CCSplitterWnd m_splitWnd
4.在框架窗口的OnCreateClient函数中添加如下代码
m_splitWnd.CreateStatic(this,1,2);
m_splitWnd.CreateView(0,0,RUNTIME_CLASS(CFormView1),CSize(100,100),pContext);
m_splitWnd.CreateView(0,1,RUNTIME_CLASS(CFormView2),CSize(100,100),pContext);
m_splitWnd.CreateView(0,0,RUNTIME_CLASS(CFormView1),CSize(100,100),pContext);
m_splitWnd.CreateView(0,1,RUNTIME_CLASS(CFormView2),CSize(100,100),pContext);
5.在框架窗口的源文件中引入下列文件,其中引入第一个是最重要的,不然会出错
#include "***Doc.h"
#include "CFormView1.h"
#include "CFormView2.h"
#include "CFormView1.h"
#include "CFormView2.h"