Print Page | Close Window

State Saving into wrong folder

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


Topic: State Saving into wrong folder
Posted By: danpetitt
Subject: State Saving into wrong folder
Date Posted: 23 July 2006 at 2:54am
The LoadCommandBars and SaveCommandBars functions appear to save into the folder:
C:\Documents and Settings\USERNAME\Application Data\APPNAME
 
This is not what I want and a bit different to every other application. It ought to save into a sub-folder (normally the company name). This is what its like in the Software section of registry as its what you use "SetRegistryKey" for.
 
So we could (and should) use this value in the command bar load/save thus:
 
Change "CXTPCommandBars::GetIsolatedFileName"...
 strAppDataFolder += CString(_T("\\")) + AfxGetApp()->m_pszAppName;
 CreateDirectory(strAppDataFolder, NULL);
 
To...
 strAppDataFolder += CString(_T("\\")) + AfxGetApp()->m_pszRegistryKey;
 CreateDirectory(strAppDataFolder, NULL); // Create directory will not create missing folders so we have to create them as we go
 strAppDataFolder += CString(_T("\\")) + AfxGetApp()->m_pszAppName;
 CreateDirectory(strAppDataFolder, NULL);

Any chance this can be fixed/improved??



Replies:
Posted By: Oleg
Date Posted: 23 July 2006 at 10:40am
Hello,
 
See SetCustomizationDataFileName method.


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


Posted By: danpetitt
Date Posted: 23 July 2006 at 3:18pm
Thanks, but there is still a lot of stuff saved in the registry.
 
If I add an icon to the toolbar (I think also if i customise the shortcuts), that info appears to be saved in the registry.
 
There are also loads of reg items starting: "CommandBars" like "CommandBars-Bar0", "CommandBars-Options" etc.


Posted By: danpetitt
Date Posted: 23 July 2006 at 3:41pm
It might be easier if we continue/merge this topic into this one:
https://forum.codejock.com/forum_posts.asp?TID=4643 - https://forum.codejock.com/forum_posts.asp?TID=4643



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