Print Page | Close Window

Storing commandbars layout in XML

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3523
Printed Date: 04 May 2024 at 12:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Storing commandbars layout in XML
Posted By: yoavo
Subject: Storing commandbars layout in XML
Date 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.




Replies:
Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net