c++ - 拆分已拆分的 Pane (MFC)

标签 c++ mfc view splitter

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

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

谢谢!

最佳答案

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);
...

关于c++ - 拆分已拆分的 Pane (MFC),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/204576/

相关文章:

c++ - Boost buffer_cast无法从void *转换为PointerToPodType

c++ - 单元测试和 boost::asio

c++ - 如何在 MFC-Dialog 中使用 OnDraw

mfc - 检测 CComboBox 编辑控件内的键盘热键

postgresql - 相当于 PgAdmin3 中的 "describe table"

c++ - C++中的析构函数是否自动释放类内声明的指针变量的内存?

c++ - 通过 C/C++ 编译和编译器错误/限制

c++ - 如何在MFC编程中使用GetDHtmlDocument()?

ios - 使用什么来移动 UIView self.frame 或 self.transform 属性?

android - 如何在一个 View 中收集具有相同值的json,在另一个 View 中收集其他值并制作动态 View