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

How to save commandbar settings to file?

 Post Reply Post Reply
Author
Message
jeffcmj View Drop Down
Groupie
Groupie


Joined: 28 October 2004
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote jeffcmj Quote  Post ReplyReply Direct Link To This Post Topic: How to save commandbar settings to file?
    Posted: 17 August 2005 at 3:57am

Hi,

I am doing a multi-user application and I want to save each user's config into a folder named by user's name. But it seems XTP always use registry to store command bar states. Is there a way to force it use file to store the state?

BTW: I used SaveBarState and LoadBarState which seems to use the file but actually still use registry instead.

Best

Jeff

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: 17 August 2005 at 7:37am

Check our GUI_Whidbey and TaskPanel sampled how to save/load to XML file

if you need binary file use CXTPPropExchangeArchive instead of CXTPPropExcahgeXMLNode.

 

Also, use search. There was some answers with code.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jeffcmj View Drop Down
Groupie
Groupie


Joined: 28 October 2004
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote jeffcmj Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2005 at 9:52am
Thanks. I got it. But one more issue, does the ini config file or XML config file support unicode?
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: 17 August 2005 at 1:28pm

In 9.70 was some problems with XML if bFormat = TRUE in Save call used... In 9.80 will be fixed all.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jeffcmj View Drop Down
Groupie
Groupie


Joined: 28 October 2004
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote jeffcmj Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2005 at 2:11am
Thank oleg. But you don't answer my question, does the INI/XML format config support Unicode ? It looks like the resulting file is ANSI format.
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: 18 August 2005 at 4:01am

Yes, it supports Unicode.

call

px.SetEncoding(_T("UTF-8"));

and it will save Unicode symbols in UTF-8 format. (Try to execure xml file it In Explorer to see Unicode characters)

in next version utf-8 encoding will be default.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jeffcmj View Drop Down
Groupie
Groupie


Joined: 28 October 2004
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote jeffcmj Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2005 at 7:34am
How about the ini file? I feel xml file is a bit slow in loading. It seems no SetEncoding function in CXTPPropExchangeIniFile.
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.063 seconds.