LoadCommandBars and StatusBar |
Post Reply |
Author | |
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
Posted: 14 July 2011 at 6:52am |
I want to load command bars, (which I consider the Ribbon and the Status Bar), the way I use the DockingPaneLayout.
I have two layouts, when I call SaveCommandBars I can see that it is written to the registry but when I call LoadCommandBars it does not update with what is in the registry. I try to hide the Status Bar in one layout and show it in the other. But it doesn't work.
Any ideas?
-cpede
|
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
Willowmaster
Senior Member Joined: 12 July 2010 Location: Netherlands Status: Offline Points: 180 |
Post Options
Thanks(0)
|
Do you have a code sample of how you save and load the commandbars?
|
|
Product: Xtreme SuitePro (ActiveX) version 15.3.1
Platform: Windows XP (32bit) - SP 3 (on VMWare) Language: Visual Basic 6.0 |
|
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
Well, I do the following:
CXTPDockingPaneLayout layoutNormal(&m_paneManager);
m_paneManager.GetLayout(&layoutNormal); layoutNormal.Save(_T("NormalLayout")); SaveCommandBars(_T("NormalLayout")); CXTPDockingPaneLayout layoutDatabase(&m_paneManager);
if (layoutDatabase.Load(_T("DatabaseLayout"))) { m_paneManager.SetLayout(&layoutDatabase); LoadCommandBars(_T("DatabaseLayout")); } and then the reverse. -cpede
|
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
Willowmaster
Senior Member Joined: 12 July 2010 Location: Netherlands Status: Offline Points: 180 |
Post Options
Thanks(0)
|
Try if you first remove all commandbars and then load. Also with ActiveX Commandbars there is a StateOptions class which holds all the values of how to save the commandbars to xml. The function to use this with is SaveStateToXMLString. But I'm not sure how this works in C++. |
|
Product: Xtreme SuitePro (ActiveX) version 15.3.1
Platform: Windows XP (32bit) - SP 3 (on VMWare) Language: Visual Basic 6.0 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Also check Samples\UserInterface\GUI_VisualStudio - it shows how to save 2 layouts to XML file
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
The Layouts for the Docking Panels works just fine. The problem is the CommandBars.
-cpede
|
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
Willowmaster
Senior Member Joined: 12 July 2010 Location: Netherlands Status: Offline Points: 180 |
Post Options
Thanks(0)
|
I can only say that I had problems with saving layouts and commandbars too. But if the sample works you just have to do exactly like the example. Small changes can have big unwanted effects. Is there a sample that does what you want to do? Or can you modify a sample so it does what you want it to do? That worked for me.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.3.1
Platform: Windows XP (32bit) - SP 3 (on VMWare) Language: Visual Basic 6.0 |
|
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 |