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 General Discussion » Control bars, tabbed container Collapse All
Subject Author Date
a a Jun 21, 2006 - 10:40 PM

Hi.

I would like to receive a notification when the user clicks on a tabbed container’s close button.
(Assuming the control bars are not docked on the tabbed container at the beginning.)

If the way to do it is to derive the tabbed container and override OnNcAreaClicked,
I would like to redefine the code that creates the tabbed container (to replace with the derived one), just when the control bar is docked onto it.

Is it possible? Or is there another way to do it?

Thanks.

PS: In fact, when the user closes a control bar, I’m killing the control bar.
And I would like to do the same with tabbed containers: to kill all the docked control bars.

Technical Support Jun 22, 2006 - 12:29 PM

How to implement a CExtDynTabControlBar-derived class with the CExtControlBar::g_nMsgCreateTabbedBar registered message is described in the FAQ How to remove the close button ("X") from the control bar?.

a a Jun 22, 2006 - 1:54 AM

And how do you enumerate controls bars with a tabbed container?

Technical Support Jun 22, 2006 - 11:35 AM

Please use this code:

#include <../Src/ExtControlBarTabbedFeatures.h>
 
CExtControlBar * pSomeBar = . . .
CExtDynTabControlBar * pTabbedBar = pSomeBar->_GetNearestTabbedContainer();
    if( pTabbedBar == NULL )
        return . . . // the pSomeBar bar is not inside tabbed group
int nCountOfBarsInTabbedGroup = pTabbedBar->GetSwitcherItemCount();
    for( int i = 0; i < nCountOfBarsInTabbedGroup; i ++ )
    {
        CExtControlBar * pBar = pTabbedBar->GetBarAt( i, false );
        . . .
    }


a a Jun 22, 2006 - 10:47 PM

Thanks.