![]() |
Command bars - multiple sites |
Post Reply ![]() |
Author | |
Smucker ![]() Senior Member ![]() ![]() Joined: 02 February 2008 Status: Offline Points: 156 |
![]() ![]() ![]() ![]() ![]() 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) |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
You can create these toolbars manually using Ids from designer:
pToolBar->GetControls()->Add(xtpControlButton, Id);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Smucker ![]() Senior Member ![]() ![]() Joined: 02 February 2008 Status: Offline Points: 156 |
![]() ![]() ![]() ![]() ![]() |
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) |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |