如何将视图添加到分割器窗格中。 [英] How do I add view to my splitter panes.
本文介绍了如何将视图添加到分割器窗格中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚创建了一个MDI MFC doc / view app,它有一个使用mfc向导的分割器,但我想知道如何将视图添加到我的每个窗格。
下面是MFC生成的代码。
I just created a MDI MFC doc/view app that has a splitter using mfc wizard,but I am wondering how I will add views to my each pane.
Below is the code that MFC generated.
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
return m_wndSplitter.Create(this,
1, 2, // TODO: adjust the number of rows, columns
CSize(10, 10), // TODO: adjust the minimum pane size
pContext);
//I ajusted the number of rows and columns to 1,2.
}
我的应用程序有多种文档类型,我想要绑定每个窗格各有一个不同的视图。我该怎么办?
My app has more than one document type and I want to bind a different view each to each pane. How do I do it?
推荐答案
你需要先声明你的视图类型,参见 https://msdn.microsoft.com/en-us/library/ha4x4wc7.aspx [ ^ ]。
You need to declare your view types first, see https://msdn.microsoft.com/en-us/library/ha4x4wc7.aspx[^].
这篇关于如何将视图添加到分割器窗格中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文