Print Page | Close Window

LoadCommandBars and StatusBar

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=18663
Printed Date: 04 October 2024 at 7:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: LoadCommandBars and StatusBar
Posted By: cpede
Subject: LoadCommandBars and StatusBar
Date 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 (22.1.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Replies:
Posted By: Willowmaster
Date Posted: 14 July 2011 at 7:32am
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





Posted By: cpede
Date Posted: 14 July 2011 at 7:59am
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 (22.1.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: Willowmaster
Date Posted: 14 July 2011 at 10:08am

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





Posted By: Oleg
Date Posted: 18 July 2011 at 2:25am
Hi,

Also check Samples\UserInterface\GUI_VisualStudio  - it shows how to save 2 layouts to XML file


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


Posted By: cpede
Date Posted: 18 July 2011 at 3:44am
The Layouts for the Docking Panels works just fine. The problem is the CommandBars.
 
-cpede


-------------
Product: Xtreme ToolkitPro (22.1.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: Willowmaster
Date Posted: 18 July 2011 at 3:50am
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






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