如何在MDI子框架中实现docablepane? [英] How to implement a docablepane within a MDI child frame wnd?

查看:161
本文介绍了如何在MDI子框架中实现docablepane?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道VS2008可以创建具有多个CDockablePane窗口的Visual Studio样式项目。我想将可停靠窗格窗口扩展到mdi子框架窗口。我的意思是创建一个带有视图的docable窗格。所以我喜欢这个...

You know that VS2008 make it possible to create a Visual Studio style project with multiple CDockablePane windows. I want to extend the dockable pane windows into mdi child frame window. What I mean is to create a docable pane with a view. So I do like this...

CMyChildFrame{
....
CDockablePlane m_wndMyDock;
....
}
CMyChildFrame::OnCreate()
{
....
// creat the dockable pane wnd
m_wndMyDock.Create(...);
//then set the dock to the view's parent frame window.
....
}





我发现PANE已成功创建,但无法将其拖到停靠边左/右/上/下。这意味着PANE不可拖动。当我在CMainFrame窗口中执行此操作时。它工作正常。



怎么了?



Sam。



I found that the PANE is created successfully, but can''t drag it to dock sides of left/right/top/bottom. It means that the PANE is not draggable. When I did this in the CMainFrame windows. it works fine.

What''s wrong?

Sam.

推荐答案

Richard MacCutchan所说的。



MFC没有实现该功能。您必须编写它,或者从现有的MFC代码中借用它。



您还需要重载UpdateAllWindows和类似方法的CView通知,因为它们依赖于windows父/子关系,如果你改变那种关系就会中断。
What Richard MacCutchan said.

MFC doesn''t implement that feature. You''ll have to write it, or borrow it from the existing MFC code.

You''ll also need to overload your CView notifications for UpdateAllWindows and similar methods, as they are dependent on the windows parent/child relationship and will break if you change that relationship.


这篇关于如何在MDI子框架中实现docablepane?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆