Help! How to save QAT to our file? |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
Posted: 24 January 2011 at 1:23pm |
I need to save out the QAT and command bar settings to our xml based customization file. I am creating an XML element in our file and obtaining the CXTPDOMNodePtr from the element, setting up a prop exchange object and call DoPropExchange. But when I am finished and I save the DOM data to a file, no command bar data appears. I have stepped thru the CJ code and I see calls that appear to be writing data. But where is the data?
I have been able to write out data when I don't pass in the xml node and later call px.SaveToFile but in this case I provide the node in our file so I can capture the data in our file (I need to write out multiple QATs and command bar settings for each MDI document type we support).
if (m_pElement)
{ CXTPDOMNodePtr pNode = m_pElement; if( pNode ){ CXTPPropExchangeXMLNode px( FALSE, pNode, _T( "Settings") ); if( px.OnBeforeExchange() ){ CXTPPropExchangeSection pxCommandBars( px.GetSection( _T( "CommandBars") ) );XTP_COMMANDBARS_PROPEXCHANGE_PARAM param; param.bSerializeControls = TRUE; param.bSaveOriginalControls = FALSE; param.bSerializeOptions = TRUE; pCommandBars->DoPropExchange( &pxCommandBars, ¶m ); } } } What is wrong with the above code? OR what do I do to get the command bar data written to our file (along with other data we write in the file)? |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
|
Doh! I wasn't appending the element to my root node!
I made a call to save to a file (which I had written earlier) where I don't create the node for the constructor call (px variable) and for which I call px.SaveToFile with a temp file. Data was saved. I then quit concentrating on setting up and performing the prop exchange and realized I created an element but didn't do anything with it except use it for the prop exchange!.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hope it works now :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |