自动隐藏控制栏 [英] Auto-hide Control Bars

查看:160
本文介绍了自动隐藏控制栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何使用对话框在CControlbar中实现自动隐藏功能?


我的项目是用CMDIFrameWnd实现的旧项目和CControlbars?我的要求是我需要在现有的CControlbar中添加自动隐藏功能。我无法使用CDockablePane。


我是否可以获得在CControlbar中添加自动隐藏功能的任何示例或想法。


提前致谢。

解决方案

您好sgrm123,


感谢您在这里发帖。


>>我的要求是我需要在现有CControlbar中添加自动隐藏功能。我无法使用CDockablePane。


我是否可以获得在CControlbar中添加自动隐藏功能的任何示例或想法

对于这种情况,我建议你使用
CDockablePane Class

CMFCAutoHideBar类
实现自动隐藏控制栏。


默认情况下,每个CDockablePane都支持自动隐藏功能。当用户单击CDockablePane标题上的pin按钮时,框架会将窗格切换到自动隐藏模式。为了处理点击,框架创建了一个
CMFCAutoHideBar Class
CMFCAutoHideButton类 。框架将新的CMFCAutoHideBar放在
CAutoHideDockSite 。该框架还将CMFCAutoHideButton附加到工具栏。
CDockingManager Class 维护CDockablePane。


希望这可以帮到你。


最好的问候,

Sera Yu



Hi,

How to achieve auto hide feature in CControlbar with dialog?

My project is an old project implemented with CMDIFrameWnd and CControlbars? My requirement is I need to add Auto hide features in existing CControlbar. I cannot use CDockablePane.

Can I get any samples or idea for adding auto hide feature in CControlbar.

Thanks in advance.

解决方案

Hi sgrm123,

thanks for posting here.

>>My requirement is I need to add Auto hide features in existing CControlbar. I cannot use CDockablePane.

Can I get any samples or idea for adding auto hide feature in CControlbar.

For this case, I suggest you use CDockablePane Class and CMFCAutoHideBar Class to implement a auto-hide control bar.

By default, each CDockablePane supports the auto-hide feature. When a user clicks the pin button on the caption of the CDockablePane, the framework switches the pane to auto-hide mode. To handle the click, the framework creates a CMFCAutoHideBar Class and a CMFCAutoHideButton Class associated with the CMFCAutoHideBar object. The framework puts the new CMFCAutoHideBar on the CAutoHideDockSite. The framework also attaches the CMFCAutoHideButton to the toolbar. The CDockingManager Class maintains the CDockablePane.

Hope this could be help of you.

Best Regards,
Sera Yu


这篇关于自动隐藏控制栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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