Print Page | Close Window

Command bars - multiple sites

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9476
Printed Date: 01 March 2025 at 12:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Command bars - multiple sites
Posted By: Smucker
Subject: Command bars - multiple sites
Date Posted: 02 February 2008 at 6:15pm
I have used Command Bars Designer to design some command bars for my application. These load and display fine.

However, I would like to use some of the command bars in panes, rather than in the main frame, but still have all defined controls available for customization of any of the command bars, without having to include them multiple times.

Can you point me to an example, or suggest the easiest way to change the docking site of some of the command bars?




-------------
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)




Replies:
Posted By: Oleg
Date Posted: 03 February 2008 at 4:04am
You can create these toolbars manually using Ids from designer:
 
pToolBar->GetControls()->Add(xtpControlButton, Id);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Smucker
Date Posted: 07 February 2008 at 12:54am
Here's what I did so I could continue to use designer, but it has some limitations (it can't be customized in-place, it can't be undocked/redocked, and commands control notifications come directly to the view):

In my view's OnSize:

    if (!m_toolscopied) {
        CXTPFrameWnd *pframe = (CXTPFrameWnd *)GetParent();
        CXTPCommandBars *pcmdbars = pframe->GetCommandBars();
        if (pcmdbars) {
            CXTPToolBar *ptbar = pcmdbars->GetToolBar(TBR_VIEW);
            if (ptbar) {
                CXTPControls *pcontrols = ptbar->GetControls()->Duplicate(TRUE);
                m_toolbar.SetControls(pcontrols);
                m_toolscopied = TRUE;
            }
        }
    }

I think it would good to be able to have multiple docking sites for a single CommandBars.



-------------
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net