Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Storing commandbars layout in XML
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Storing commandbars layout in XML

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


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Topic: Storing commandbars layout in XML
    Posted: 17 January 2006 at 8:41am

Hi,

In my application I am storing the layout of the commandbars in an .XML file. I have more than one layout (for each document template a different layout), and I need to load defaults if the specific section was not created yet. The problem is that I can not tell if a section exists in the XML file (because the method GetSection of CXTPPropExchangeXMLNode always return a value). I know that I can overcome the problem using an XML file for each document template, but I preffer to have only one file.

Is there a way to know if a Section exists or not in the XML file ?

Here is my code:

CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings"));

if (px.LoadFromFile(m_strIniFileName))

{

CXTPPropExchangeSection pxCommandBars(px.GetSection(strDocTmpl));

XTP_COMMANDBARS_PROPEXCHANGE_PARAM param; param.bSerializeControls = TRUE;

GetCommandBars()->DoPropExchange(&pxCommandBars, &param);

}

Yoav.

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: 17 January 2006 at 11:28am

Hello,

At least in 9.80 was added

px.IsSectionExists(strDocTmpl) method.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.172 seconds.