Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Command bars - multiple sites
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Command bars - multiple sites

 Post Reply Post Reply
Author
Message
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Topic: Command bars - multiple sites
    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)

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post 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)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.