Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Why is Ribbon bar read/write different ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Why is Ribbon bar read/write different ?

 Post Reply Post Reply
Author
Message
hipopotamo View Drop Down
Groupie
Groupie


Joined: 01 June 2006
Location: Portugal
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote hipopotamo Quote  Post ReplyReply Direct Link To This Post Topic: Why is Ribbon bar read/write different ?
    Posted: 26 December 2007 at 3:01pm
Hi ,
 
 When I try to write RibbonBar to XML Node, it only writes QuickAccessControls, but read( from your example )works fine.
 
 
// Read
 
 CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings"));

 if (px.LoadFromResource(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_LAYOUT), RT_HTML))
 {
  CXTPPropExchangeSection pxCommandBars(px.GetSection(_T("CommandBars")));
  XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;
  param.bSerializeControls = TRUE;
  GetCommandBars()->DoPropExchange(&pxCommandBars, &param);

  CString s = px.GetXML(false);
  AfxMessageBox( s );

 }

 
// Write
 {


  CXTPPropExchangeXMLNode px( false, 0, _T("Settings"));
  
  CXTPPropExchangeSection pxCommandBars(px.GetSection(_T("CommandBars")));
  XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;
  param.bSerializeControls = TRUE;
  GetCommandBars()->DoPropExchange(&pxCommandBars, &param);

  CString s = px.GetXML(false);

  AfxMessageBox( s );
 }

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: 27 December 2007 at 8:33am
add
pRibbonBar->EnableCustomization(TRUE) before save , FALSE after.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
hipopotamo View Drop Down
Groupie
Groupie


Joined: 01 June 2006
Location: Portugal
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote hipopotamo Quote  Post ReplyReply Direct Link To This Post Posted: 27 December 2007 at 1:14pm

Hi Oleg!

Tkx

Regards

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