Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Saving settings to file...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Saving settings to file...

 Post Reply Post Reply
Author
Message
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Topic: Saving settings to file...
    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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2006 at 2:39pm
Thanks, I will take a look in that sample.
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post 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.
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.047 seconds.