Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - PaneLayout using SaveToFile
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PaneLayout using SaveToFile

 Post Reply Post Reply
Author
Message
JamesC View Drop Down
Newbie
Newbie


Joined: 03 December 2003
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesC Quote  Post ReplyReply Direct Link To This Post Topic: PaneLayout using SaveToFile
    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.



Edited by JamesC
Back to Top
JamesC View Drop Down
Newbie
Newbie


Joined: 03 December 2003
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesC Quote  Post ReplyReply Direct Link To This Post 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.
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.125 seconds.