本帖最后由 szsihe 于 2012-02-24 18:29:49 编辑

解决方案 »

  1.   

    没人顶呀,贴上我自己的代码,各位大哥看下那里错了,这样方便点,谢谢BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
    {
    // TODO: Add your specialized code here and/or call the base class

    //创建一个静态分栏窗口,分为三行一列 
    if (!wndSplitter1.CreateStatic(this,2,1) ||
    !wndSplitter2.CreateStatic(&wndSplitter1,1,3,WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, wndSplitter1.IdFromRowCol(0,0)))
    {
    TRACE("Error creation of rulers\n");
    return FALSE;
    }

    CRect cRect;
    GetClientRect(&cRect); //创建第一行的三个视图
    wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CViewLeft),CSize(200,cRect.Height()-150),pContext);
    wndSplitter2.CreateView(0,1,RUNTIME_CLASS(CSIHECMSView),CSize(cRect.Width()-400,cRect.Height()-150),pContext);
    //wndSplitter2.CreateView(0,2,RUNTIME_CLASS(CViewRightTop),CSize(200,cRect.Height()-150),pContext);
    if (wndSplitter3.CreateStatic(&wndSplitter2,2,1,WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, wndSplitter2.IdFromRowCol(0,2)))
    {
    TRACE("Error creation of rulers\n");
    return FALSE;
    }
    wndSplitter3.CreateView(0,0,RUNTIME_CLASS(CViewRightTop),CSize(200,cRect.Height()/2),pContext);
    wndSplitter3.CreateView(0,1,RUNTIME_CLASS(CViewRightBottom),CSize(200,cRect.Height()/2),pContext);
    //创建第二行的视图
    wndSplitter1.CreateView(1,0,RUNTIME_CLASS(CViewBottom),CSize(cRect.Width(),150),pContext);
    return TRUE;
    //return CFrameWnd::OnCreateClient(lpcs, pContext);
    }