各位大哥,我在使用以下程序来四切分窗口,思路是:先用m_wndSplitter1把窗口切分成上下两个窗口,然后再分别用m_wndSplitter2和m_wndSplitter3切分上下两个分窗口,即成四个窗口。之所以没先进行纵切,而选择横切,是为了能够每个窗口横向大小可以调。
 下面这段程序代码编译通过,但执行时却失败,请各位大哥帮帮忙!!!!
         m_wndSplitter1.CreateStatic(this,2,1);

m_wndSplitter2.CreateStatic(&m_wndSplitter1,1,2,
          WS_CHILD | WS_VISIBLE |WS_HSCROLL, 
                  m_wndSplitter1.IdFromRowCol(0,0));
m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CLeftTopView),
CSize(400,400),pContext);
    m_wndSplitter2.CreateView(0,1,RUNTIME_CLASS(CTflspView),
CSize(400,400),pContext); m_wndSplitter3.CreateStatic(&m_wndSplitter1,1,2,
          WS_CHILD | WS_VISIBLE |WS_HSCROLL, 
                  m_wndSplitter1.IdFromRowCol(1,0));
m_wndSplitter3.CreateView(1,0,RUNTIME_CLASS(CDataAnalyse),
CSize(400,200),pContext);
m_wndSplitter3.CreateView(1,1,RUNTIME_CLASS(CBottomView),
CSize(400,200),pContext);

解决方案 »

  1.   

    m_wndSplitter1.CreateStatic(this,2,1);

    m_wndSplitter2.CreateStatic(&m_wndSplitter1,1,2,
              WS_CHILD | WS_VISIBLE |WS_HSCROLL, 
                      m_wndSplitter1.IdFromRowCol(0,0));
    m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CLeftTopView),
    CSize(400,400),pContext);
        m_wndSplitter2.CreateView(0,1,RUNTIME_CLASS(CTflspView),
    CSize(400,400),pContext); m_wndSplitter3.CreateStatic(&m_wndSplitter1,1,2,
              WS_CHILD | WS_VISIBLE |WS_HSCROLL, 
                      m_wndSplitter1.IdFromRowCol(1,0));
    m_wndSplitter3.CreateView(0,1,RUNTIME_CLASS(CDataAnalyse),
    CSize(400,200),pContext);
    m_wndSplitter3.CreateView(0,1,RUNTIME_CLASS(CBottomView),
    CSize(400,200),pContext);
      

  2.   

    m_wndSplitter1.CreateStatic(this,2,1);

    m_wndSplitter2.CreateStatic(&m_wndSplitter1,1,2,
              WS_CHILD | WS_VISIBLE |WS_HSCROLL, 
                       m_wndSplitter1.IdFromRowCol(0,0));
    m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CLeftTopView),
    CSize(400,400),pContext);
    m_wndSplitter2.CreateView(0,1,RUNTIME_CLASS(CTflspView),
    CSize(400,400),pContext);m_wndSplitter3.CreateStatic(&m_wndSplitter1,1,2,
              WS_CHILD | WS_VISIBLE |WS_HSCROLL, 
                       m_wndSplitter1.IdFromRowCol(1,0));
    m_wndSplitter3.CreateView(0,0,RUNTIME_CLASS(CDataAnalyse),
    CSize(400,200),pContext);
    m_wndSplitter3.CreateView(0,1,RUNTIME_CLASS(CBottomView),
    CSize(400,200),pContext);
      

  3.   

    把#include "xxx.doc"放在最前面
    dialog属性child 去掉标题栏
      

  4.   

    编译显示什么错,贴出来,如果是编译没有错,只是并没有将窗口分成设置的大小,必须移动分割条才能够将最左边的窗口显示出来,可以参考:
    http://expert.csdn.net/Expert/topic/1103/1103258.xml?temp=.3410913
    主要是没有设置宽度