近期在做一个基于单文档拆分窗口的工程时,想在其中的一个拆分窗口添加一个属性页。预计效果就和msdn的左边那个窗口类似。加完以后发觉显示的时候不太正常,总有一部分不能正常显示。我怀疑是TabControl的问题,但是不知道如何调整。或者是我思路有问题。如果有哪位大虾提供相关解决办法,不胜感激。
    谢谢!

解决方案 »

  1.   

    顶,我也碰到类似问题,但我知道不是控件的问题,OnCreateClient()里弄了好久还是不理想,但只要调整一下分割条就好了,所以是不是要刷新一下!期待中
      

  2.   

    在CMainFrame中用Splitter窗口,进行两次拆分:BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
    {
    // TODO: Add your specialized code here and/or call the base class
        CRect rc;
        GetClientRect(&rc);
        CSize szUpDown(rc.Width(), rc.Height()/2);
     
        BOOL bCreateSpltr = m_wndSplitUpDown.CreateStatic( this, 2, 1);  //拆分为上下两个窗口    if(m_wndSplitLeftRight.CreateStatic(&m_wndSplitUpDown,1,2,WS_CHILD|WS_VISIBLE, 
            m_wndSplitUpDown.IdFromRowCol(0, 0))==NULL) //将上面的窗口拆分为左右两部分
            return FALSE;
        m_wndSplitLeftRight.CreateView(0,0,RUNTIME_CLASS(CGridView), CSize(rc.Width()/2+100, 100),  
          pContext);//左上窗口创建
        m_wndSplitLeftRight.CreateView(0,1,RUNTIME_CLASS(CListView), CSize(rc.Width()/2, 100),  
          pContext); //右上窗口创建
        m_wndSplitUpDown.SetRowInfo(0, rc.Height()/2+100, 0);
        m_wndSplitUpDown.CreateView(1,0,RUNTIME_CLASS(CNomalView), CSize(100,100), 
          pContext); //创建下面窗口    m_wndSplitUpDown.RecalcLayout();
        m_wndSplitLeftRight.RecalcLayout(); return bCreateSpltr;
    }