拆分已经拆分的窗格 (MFC)

Kon*_*rad 2 c++ mfc views splitter

在我的 MFC 程序中,我使用拆分器来创建两个窗格。我现在想再次将这些窗格中的一个分成两半并放入另一个视图,有人可以告诉我如何做或指向一些代码的方向吗?

我更喜欢自己编写代码,所以我对自定义派生类不感兴趣,除非它们非常基础。

谢谢!

Rob*_*Rob 5

CMainFrame::OnCreateClient

// Create splitter with 2 rows and 1 col
m_wndSplitter.CreateStatic(this, 2, 1);
// Create a view in the top row
m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CView1), CSize(100, 100), pContext);
// Create a 2 column splitter that will go in the bottom row of the first
m_wndSplitter2.CreateStatic(&m_wndSplitter, 1, 2, WS_CHILD|WS_VISIBLE, m_wndSplitter.IdFromRowCol(1, 0));
// Create views for the bottom splitter
m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CView2), CSize(100, 100), pContext); 
m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(CView3), CSize(100, 100), pContext);
...
Run Code Online (Sandbox Code Playgroud)