gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-10-31 01:24:02 26 4
gpt4 key购买 nike

在我的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com