Print Page | Close Window

How to save commandbar 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=2733
Printed Date: 08 November 2025 at 9:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to save commandbar settings to file?
Posted By: jeffcmj
Subject: How to save commandbar settings to file?
Date 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




Replies:
Posted By: Oleg
Date 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


Posted By: jeffcmj
Date 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?


Posted By: Oleg
Date 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


Posted By: jeffcmj
Date 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.


Posted By: Oleg
Date 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


Posted By: jeffcmj
Date 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.



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