Professional UI Solutions
Site Map   /  Register


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 General Discussion » adding control in CExtResizableDialog title Collapse All
Subject Author Date
Borremans Pierre Dec 5, 2009 - 10:10 PM

Is it possible to add a control (a comboboc and a button) in the title of a CExtResizableDialog ? (the same thing like word 2007)

Technical Support Dec 9, 2009 - 1:29 PM

This is possible for UI themes which support skinned window non-client areas. This is a trick and the CExtRibbonBar control does not support such mode. You will need to create the CExtRibbonBar-derived class and override the following virtual methods:

INT CExtRibbonPage::RibbonLayout_GetTabIntersectionHeight() const
INT CExtRibbonPage::RibbonLayout_GetTabLineHeight() const
INT CExtRibbonPage::RibbonLayout_GetBottomLineHeight() const
INT CExtRibbonPage::RibbonQuickAccessBar_GetBottomHeight() const
INT CExtRibbonPage::RibbonLayout_GetGroupHeight(
            CExtRibbonButtonGroup * pGroupTBB
            ) const
INT CExtRibbonPage::RibbonLayout_GroupCaptionGetHeight(
            const CExtRibbonButtonGroup * pGroupTBB
            ) const

All these methods should return zero value. If you are going to create ribbon in dialog, then your dialog should be based on the CExtNCW template class and it should invoke the CWnd::RepositionBars( 0, 0xFFFF, 0 ); both at the end of the OnInitDialog() virtual method and in the WM_SIZE message handler if the resizing event type is not SIZE_MINIMIZED.
But even in this case the combo boxes of ribbon bar are not the combo box common controls. They are non-HWND UI elements. The CExtCustomizeSite class and based on it ribbon classes support the built-in text fields and combo fields inside toolbars, menus and ribbons. So, the combo boxes you can see in the RibbonBar and StyleEditor sample applications and not combo box windows - they are text/combo fields which can appear even inside popup menus and ribbon bar’s quick access toolbar embedded into window caption.

Borremans Pierre Dec 10, 2009 - 2:57 AM

OK I will use the ribbon solution but my ribbonbar is for a CExtControlBar not for the mainframe window. How to add a ribbonbar on a CExtControlBar ? I search in your sample but I don’t find how to.

Technical Support Dec 11, 2009 - 3:18 PM

The ribbon bar control should be created as a child of desktop window. It cannot be created inside the windows based on the WS_CHILD standard window style. It cannot be created inside control bar. Could you please provide us with any screen shots or URLs painting to any software with combo boxes inside window captions? We will try to find and/or code a ready-to-use solution for you.

Borremans Pierre Dec 14, 2009 - 2:23 AM

I have no sample of any software with combo boxes inside window captions. We are searching for a solution for having in a dockable window a combo boxe. If we had this combo boxes in the window we loose a lot a place and the best solution is to had this combo boxes in the caption.

If it’s not possible to add a ribbonbar in a CExtControlBaror or in a dockable CExtResizableDialog. I think that the only solution is to redraw the window’s caption, insert and draw the combobox. Have you another idea ?


thanks for your help

Technical Support Dec 14, 2009 - 9:29 AM

Here is the real life example of what you probably need:

You can find many similar combo boxes near the control bar caption in the Visual Studio .NET / 2005 / 2008 / 2010.

Technical Support Dec 9, 2009 - 1:28 PM

The caption of the CExtControlBar window is part of its non-client area. It’s not possible to create any window inside non-client area of other window. The classic approach is to create some toolbar near the caption of resizable bar and insert combo box into it. You can find a lot of examples of such design in Visual Studio .NET / 2005 / 2008 / 2010, in the <span class="newgreen">ProfStudio</spa> and <span class="newgreen">GLViews</spa> sample applications provided with Prof-UIS.

Borremans Pierre Dec 9, 2009 - 2:28 AM

If I use a CExtControlBar is it possible to add a combobox in the caption bar ?

Technical Support Dec 7, 2009 - 4:38 AM

It’s not possible to insert controls into the window’s non-client area. The default window non-client area consist of the caption and borders. The caption contains the [_][O][X] buttons but they are custom painted elements - they are not a push button controls. The Office 2007 and Office 2010 applications use the ribbon bar control which uses the skinned caption containing quick access toolbar where buttons, text fields and combo boxes can appear. But this caption is not a window caption. The ribbon bar control removes caption and top window border and replaces them with caption like looking area which is really part of ribbon bar. The RibbonBar sample application provided with Prof-UIS does the same.

Borremans Pierre Dec 8, 2009 - 6:05 AM

Is it possible to use the ribbon bar in a CExtResizableDialog  with only the caption ? Do I must resize the ribbonbar ?

Is it possible to insert combobox in the caption ribbonbar ?