如何在MFC中创建固定和不可浮动的控制栏? [英] How to create fixed and non floatable controlbar in MFC?
问题描述
如何在MFC中创建固定和不可浮动的控制栏?
How to create fixed and non floatable controlbar in MFC?
我正在设置只有这个 样式 WS_CHILD | WS_VISIBLE | CBRS_RIGHT | CBRS_TOOLTIPS | CBRS_SIZE_FIXED | CBRS_ALL,但控制栏仍然可以浮动。
I am setting only this styles WS_CHILD | WS_VISIBLE | CBRS_RIGHT|CBRS_TOOLTIPS|CBRS_SIZE_FIXED|CBRS_ALL but still the controlbar is floatable.
请帮助我。
推荐答案
您好,
感谢您在此发帖。
据我所知,从框架窗口中分离可停靠的工具栏称为浮动工具栏。 调用
CFrameWnd :: FloatControlBar 执行此操作。当用户将工具栏拖离其停靠位置并丢弃时,框架会调用此函数它在未启用停靠的位置
As far as i know that detaching a dockable toolbar from the frame window is called floating the toolbar. Call CFrameWnd::FloatControlBar to do this. The framework calls this function when a user drags a toolbar off its docked location and drops it in a location where docking is not enabled
我不确定您是否要使用可停靠的工具栏?
I am not sure that you want to do dockable toolbar ?
如果是,您可以致电  ;当用户尝试删除工具栏的一侧时, CFrameWnd :: DockControlBar 允许对接的框架窗口。
If yes, you can call the CFrameWnd::DockControlBar when the user attempts to drop the toolbar on a side of the frame window that allows docking.
准备好对接目标后,必须以类似的方式准备工具栏(或源)。为您想要的每个工具栏调用
CControlBar :: EnableDocking 停靠。
After you have prepared the destination for docking, you must prepare the toolbar (or source) in a similar fashion. Call CControlBar::EnableDocking for each toolbar you want to dock.
如果你不想创建一个可停靠的工具栏,请告诉我有关这个问题的更多信息。
If you don't want to create a dockable toolbar, please tell me more information about the issue.
最好的问候,
Hart
这篇关于如何在MFC中创建固定和不可浮动的控制栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!