Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Docking of Ribbon Bar Collapse All
Subject Author Date
Chun Pong Lau Oct 5, 2006 - 10:06 AM

Dear support team,

Can I dock a ribbon bar, CExtRibbonBar like the way I dock it in CExtDynamicControlBar?

For example, can it be docked in the bottom by a similar method like CExtDynamicControlBar::DockControlBarInnerOuter(..) or inside another control bar like CExtDynamicControlBar::DockControlBarLTRB(..)?

Thanks in advance,
Alan

Technical Support Oct 6, 2006 - 5:23 AM

The CExtRibbonBar window is not enabled for redocking via drag-and-drop. Although you can dock it programmatically against the top/bottom side of its parent window, we do not recommend you change ribbon bar’s default top-oriented location because you will lose one of its most important features: integration with the caption area.

Chun Pong Lau Oct 8, 2006 - 8:19 PM

Can you please show me some ideas on how to dock it programmatically?

Regards,
Alan

Technical Support Oct 9, 2006 - 7:59 AM

The CExtControlBar::Create() method, which is available both in CExtRibbonBar and in CExtRibbonPage has a parameter dwStyle, which specifies a set of styles. You should replace CBRS_TOP with CBRS_BOTTOM in it. The generic MFC control bar styles can also be accessed and modified using the CControlBar::GetBarStyle() and CControlBar::SetBarStyle() methods. Additionally you should disable the caption integration feature of the ribbon bar by overriding the CExtRibbonPage::RibbonLayout_IsFrameIntegrationEnabled() virtual method and returning false in it. This is essential because in your case the ribbon bar is docked at the bottom of its parent so the ribbon bar should not be integrated with the parent window’s caption at the top.