本帖最后由 huangkele8 于 2012-05-18 10:40:43 编辑

解决方案 »

  1.   

     
            CRect rect;
    GetClientRect(&rect);
    if(!m_splitter.CreateStatic(this,1,2,WS_CHILD|WS_VISIBLE|WS_BORDER))//加入测试,看是否分割成功
    {
    TRACE(_T("failed to create the splitter"));
    return FALSE;
    }
    if(!m_splitter.CreateView(0,1,RUNTIME_CLASS(CSplitView),CSize(rect.Width()/2,rect.Height()),pContext))
    {
    TRACE(_T("Failed to create view in first pane"));
    return FALSE;
    }
    if(m_splitterleft.CreateStatic(&m_splitter,2,1,WS_CHILD|WS_VISIBLE,m_splitter.IdFromRowCol(0,0)) ==NULL)
    return FALSE;
    m_splitterleft.CreateView(0,0,RUNTIME_CLASS(CLeftPaneView),CSize(100,100),pContext);
      m_splitterleft.CreateView(1,0,RUNTIME_CLASS(CLeftPaneView),CSize(100,100),pContext);
    return TRUE;我感觉可能是你的第一个分割窗口没有创建成功导致的
      

  2.   

    你的CSplitView是基类是什么?
    该类的同文件和实现文件中应该分别由这俩个宏
    DECLARE_DYNAMIC和IMPLEMENT_DYNAMIC