Print Page | Close Window

docking pane layout to XML does not work!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=2423
Printed Date: 12 December 2024 at 2:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: docking pane layout to XML does not work!
Posted By: spike
Subject: docking pane layout to XML does not work!
Date Posted: 21 June 2005 at 8:51am

I am trying to save docking pane layouts to an xml file, this used to work in the 9.50 version of the toolkit. With the latest version 9.601 this no longer works. It only saves 1 layout per XML file.

I am kind of curious why you switched from using MSXML to write the file to using CStdioFile, I believe this is part of the problem.

Has there been a fix to this?




Replies:
Posted By: Oleg
Date Posted: 21 June 2005 at 1:35pm

Here code you can use:

to save:

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

CXTPPropExchangeSection pxLayout1(px.GetSection(_T("Layout1")));

pLayout1->DoPropExchange(&pxLayout1);

CXTPPropExchangeSection pxLayout1(px.GetSection(_T("Layout2")));

pLayout2->DoPropExchange(&pxLayout2);

px.SaveToFile(m_strIniFileName);

 

to load:

CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings")); // To serialize to XML file

if (px.LoadFromFile(m_strIniFileName))

{

   

CXTPPropExchangeSection pxLayout1(px.GetSection(_T("Layout1")));

pLayout1->DoPropExchange(&pxLayout1);

CXTPPropExchangeSection pxLayout1(px.GetSection(_T("Layout2")));

pLayout2->DoPropExchange(&pxLayout2);


}



-------------
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