我现在想把一个单文档界面分成上下两个部分,请问怎么可以实现?能给点原码,更是感谢~!

解决方案 »

  1.   

    好象有个CSplitView
    原来jjhou用过的!
      

  2.   

    土星---你是指的CSSplitView把,这个是分成左右两栏的,而且我也不是很能理解,见笑了!
      

  3.   

    Class CMainFrame
    // Attributes
    protected:
    CSplitterWnd m_wndSplitter;BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
    CCreateContext* pContext)
    {
    if (m_wndSplitter.CreateStatic(this,2,1))
    {
    CRect rect;
    GetClientRect(&rect);
    CSize size = rect.Size();
    size.cy-=150;
    if (m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CChatView),size,pContext))
    {
    if (m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CSendView),CSize(0,0),pContext))
    {
    SetActiveView((CView*)m_wndSplitter.GetPane(1,0));
    return TRUE;
    }
    }
    }
    return FALSE;
    }
      

  4.   

    moveto 0,height/2
    lineto width,height/2