Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - LoadCommandBars and StatusBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

LoadCommandBars and StatusBar

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: LoadCommandBars and StatusBar
    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++)
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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 (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



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: 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
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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 (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



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.235 seconds.