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 » Tabbed CExtControlBar Collapse All
Subject Author Date
chris fudge Mar 29, 2005 - 1:03 AM

I have a subclassed CExtControlBar which I use to hide the "pin button", I also use the subclass to do some custom actions when the close button is clicked on the control bar. The problem is that when 2 or more control bars are tabbed together the pin button reappears and my custom close button handler stops working (presumably because when they are tabbed together the CExtControlBar class is no longer used)

Which class do i need to subclass to handle the close button and hise the pin when control bars are tabbed? Do I also need to overload a method in CExtControlBar to ensure that the tabbed subclass is used?


Technical Support Mar 29, 2005 - 11:02 AM

If you don’t need the auto-hide feature at all, just don’t invoke the CExtControlBar::FrameInjectAutoHideAreas() method in the CMainFrame::OnCreate() method. In this case the pin buttons are not displayed. Of course, it is possible to control pin buttons optionally even those that are in tabbed bar groups. When two or more control bars are docked into a tabbed group they are located in the CExtDynTabControlBar window, which is created dynamically. The CExtDynTabControlBar class is derived from the CExtControlBar class and manages its own caption buttons. It is possible to make Prof-UIS use your own CExtDynTabControlBar-derived class with a custom set of caption buttons. You need to handle the CExtControlBar::g_nMsgCreateTabbedBar registered windows message in your main frame window:

    ON_REGISTERED_MESSAGE(
        CExtControlBar::g_nMsgCreateTabbedBar,
        OnMsgCreateTabbedBar
        )

    LRESULT CMainFrame::OnMsgCreateTabbedBar(
        WPARAM wParam,
        LPARAM lParam
        )
        {
            lParam; // unused
            CExtDynTabControlBar ** ppDynTabBar =
                (CExtDynTabControlBar **) wParam;
            (*ppDynTabBar) =
                new C_YOUR_DynTabControlBar;
            return 0;
        }

chris fudge Mar 30, 2005 - 4:55 AM

When I create my CExtDynTabControlBar derived class I get the following compilation error:

error C2504: ’CExtDynTabControlBar’ : base class undefined

Is there a specific header I need to include ?

Im currently using the 2.30 trial.

chris fudge Mar 30, 2005 - 9:14 AM

Its ok - found it now

#include <ExtControlBarTabbedFeatures.h>

All working - thanks!