MFC DockablePane不浮动或隐藏 [英] MFC DockablePane not floating or hiding
问题描述
有什么方法可以使MFC DockablePane(来自新的功能包)停靠在无法浮动或隐藏的窗口中(甚至禁用允许用户选择状态的上下文菜单-可停靠,浮动,隐藏等)
Is there any way to make a MFC DockablePane (from the new Feature Pack) that is docked in a window not able to float or to hide (and even disable the context menu that allows the user to select the states - dockable, float, hide etc.)
我基本上想要的是在一个窗口上具有3个窗格,这些窗格可以更改其水平尺寸,但不能更改其在窗口内的位置.有什么建议吗?
What I basically want is to have 3 panes on a window that can change their horizontal dimensions, but not their position inside the window. Any suggestion?
推荐答案
解决方案是扩展CDockablePane并在此类中重写以下事件:
The solution is to extend the CDockablePane and override in this class the following events:
virtual BOOL CanFloat() const;
virtual BOOL CanBeClosed() const;
virtual BOOL CanAutoHide() const;
以便他们返回FALSE;
so that they return FALSE;
有关更多信息,请参见 MFC扩展的MSDN自定义提示
for more information see MSDN Customization Tips for the MFC Extensions
这篇关于MFC DockablePane不浮动或隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!