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 » CExtControlBar Quest Collapse All
Subject Author Date
Ulrich Kallenbach Nov 23, 2004 - 7:58 AM

Hi,


how can I set  how the captions are display for docked contral bars. For example: By default, if docked to the left of the frame window and in auto-hide mode the caption is displayed in a tab using a top-down oriented font. How can the font be changed to bottom-up? If two control bar are docked inside each other the captions are shown in tabs located at the bottom of the docked group. How to display the tabs at the top of the group?


I believe I have seen this in the examples or somewhere in the forum, but I not sure. At least, I cannot remember exactly where.


Could you please give me a hint?


Thanks, Ulrich     


 

Technical Support Nov 24, 2004 - 7:41 AM

Create a class derived from CExtControlBar and override the virtual method below in it:

virtual void OnGetBarCaptionText(
        e_bar_caption_text_t eBCT,
        CExtSafeString & strCaptionText
        ) const;
In the new method, put string values to strCaptionText (which is an output parameter) depending on the eBCT argument which can have the following values:
__EBCT_SINGLE_CAPTION_DOCKED - your method returns the caption of the control bar that is docked independently from other control bars
__EBCT_SINGLE_CAPTION_FLOATING - your method returns the caption of the control bar that is in the floating state in its own mini frame window
__EBCT_TAB_GROUP_CAPTION_DOCKED - your method returns the caption of the tab group when the control bar is selected in the tab group and this group is in the docked state
__EBCT_TAB_GROUP_CAPTION_FLOATING - your method returns the caption of the tab group when the control bar is selected in the tab group and this group is in the floating state
__EBCT_TAB_ITEM_CAPTION - your method returns the caption of the tab item
__EBCT_AUTOHIDE_ITEM_CAPTION - your method returns the caption of the grouped tab item in the autohide tabs
__EBCT_AUTOHIDE_SLIDER_CAPTION - your method returns the caption of the window which slides out from the autohide tabs.


You can also change the font orientation in the vertical autohide tabs. These autohide tabs are child windows of the main frame window and they are instances of the CExtDynAutoHideArea class derived from the CExtTabWnd class (to make the CExtDynAutoHideArea type visible for the compiler, you need to include the ../Src/ExtControlBarTabbedFeatures.h file). So, you may walk through all child windows of the main frame window and get their CWnd pointers. For each CWnd you may apply DYNAMIC_DOWNCAST to the CExtDynAutoHideArea type. You will get four pointers of the CExtDynAutoHideArea type. The last two of them are vertical autohide tab windows and you may make them change the vertical font direction by calling the CExtTabWnd::ModifyTabWndStyle( 0, __ETWS_INVERT_VERT_FONT, true ) method.

There is no easy way to show tabs at the top of the tab group now. We will regard this as a feature request.