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

Magical Ribbonbar

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

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 874
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Magical Ribbonbar
    Posted: 04 December 2009 at 3:49pm
The other day I added some code to save a ribbon bar created by a customize command out to a file. I did that by creating (ok, copying sample code) a CXTPPropExchangeXMLNode for "Settings" and creating a "CommandBars" section. I created a CommandBars object (did not use the frame's command bars object) and a ribbon from that object. I did have to set the site to our frame (otherwise CJ crashes).
 
Today I have noticed that after we build our ribbon using code, that when I load the command bars using the CJ LoadCommandBars method, our ribbon gets a number of tabs added to it. The tabs have groups and controls on them. But none of these should be present. These tabs were present in my customized ribbon I previously saved to the xml file. The file no longer exists as I did that just for testing purposes.
 
I found that under the "UI" registry entry there is a "xxx-controls" entry and a "Controls" REG_SZ entry there. The entry points to my AppData\Roaming directory where there is a binary compressed zip file. CJ is opening that up and pulling in all this old/incorrect data and adding it to my ribbon. The entries on my ribbon we build in code are not repeated. Only items that were on the customized version that are not built in code are being added.
 
Note the file in AppData is NOT the same as the xml file I previously wrote out although it appears to contain the controls that existed at the point when I wrote it out.
 
Can someone tell me how I can do ribbon I/O to the xml file but only have CJ reload saved data when I specifically use the data exchange object (above) to read my ribbon from disk? Or at least explain exactly how CJ works vis-a-vis the saved binary file in appdata\roaming and the ribbon xml file, that I may or may not choose to load at runtime.
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.141 seconds.