Print Page | Close Window

Saving settings to file...

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=4643
Printed Date: 10 November 2025 at 8:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Saving settings to file...
Posted By: danpetitt
Subject: Saving settings to file...
Date Posted: 23 July 2006 at 4:01am
I want to be able to save all customisation settings to files in "AppSettings".
 
I have found a couple of problems, and some places where stuff is saved only to registry: Shortcuts being one.
 
Can someone give me a definitive list of things I need to change/add to get this to work.
 
If you can base examples on the Whidbey sample then I can cross reference that code with mine.
 
I have got a dock layout saving to file:
 CXTPDockingPaneLayout layoutNormal( &m_paneManager );
 m_paneManager.GetLayout( &layoutNormal );
 layoutNormal.SaveToFile( GetAppDataLocation( _T("DockLayout.xml") ), _T("NormalLayout") );

But nothing else yet. Please can someone help, thanks.



Replies:
Posted By: Oleg
Date Posted: 23 July 2006 at 10:43am
Hi,
 
from toolbox sample:
 
CXTPPropExchangeXMLNode px(FALSE, 0, _T("Settings"));

CXTPPropExchangeSection pxCommandBars(px.GetSection(_T("CommandBars")));
  GetCommandBars()->DoPropExchange(&pxCommandBars);
 
px.SaveToFile(m_strIniFileName);



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: danpetitt
Date Posted: 23 July 2006 at 2:39pm
Thanks, I will take a look in that sample.


Posted By: danpetitt
Date Posted: 23 July 2006 at 3:36pm
I am still very confused, whats the difference between all these different ways of saving stuff.
 
Load/SaveCommandState
CXTPDockingPaneLayout::SaveToFile
CXTPPropExchangeSection pxCommandBars ... SaveToFile
 
And the last one (taken from toolbox example) gives me a crash in ~CXTPPropExchangeXMLNode
 
All I want to do is save all the docking bar layouts, keyboard and toolbar customisations to settings files and not in the registry.
 
Can you give me an explanation as to how I do this, thanks.


Posted By: danpetitt
Date Posted: 23 July 2006 at 4:33pm
Aha, I found a perfect example in the Whidbey example. For anyone out there, search for "ExchangeLayout" in Mainfrm.cpp.
 
Thanks for your patience.
 
I think this is my example of where documentation is lacking, you have to really go through every sample and study them to find out all the things that the excellent Toolkit can do.



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