Print Page | Close Window

PaneLayout using SaveToFile

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=379
Printed Date: 27 September 2024 at 3:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: PaneLayout using SaveToFile
Posted By: JamesC
Subject: PaneLayout using SaveToFile
Date Posted: 22 January 2004 at 3:43pm

When I call the SaveToFile function on the CXTPDockingPaneLayout, my app blows up. I am not sure what the problem is. In the OnCreate of the MDIClientWnd I call m_pLayout = m_paneManager.CreateLayout(); after I create the Panes that I want. I then try to read the file:

if (m_pLayout->LoadFromFile("C:\\MyTest.txt", _T("My Test")))

{

   m_paneManager.SetLayout(m_pLayout);

}

this does nothing since the file does not exist yet.... then in the OnDestroy I call the save...

m_paneManager.GetLayout(m_pLayout);

m_pLayout->SaveToFile("C:\\MyTest.txt", _T("My Test"));

delete m_pLayout;

and it blows up in the SaveToNode inside SaveToFile.. actual line is line 584 of XTPDockingPaneLayout.cpp

ASSERT(xmlElementPtr != 0);

I followed the examples and even modified others and tried it there and they work. What am I doing wrong. Thank in advance.




Replies:
Posted By: JamesC
Date Posted: 22 January 2004 at 5:00pm
Ok.. I modified the MDIPane example and discovered that the section name can not have spaces in it. Just incase anyone was wondering. That seemed to fix the problem.



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