New
#1
Registry location for storing data
I'm creating a new release (version 5) of an application whose registry contents won't be compatible with earlier releases, so I changed my code to write everything under:
HKCU\Software\DeepSkyStacker\DeepSkyStacker5
and that is working just fine.
However there's a custom control that I use that us storing all its stuff using:
AfxGetApp()->WriteProfileBinary(_T("PictureList"), _T("Settings") ...);
and that stuff ends up here:
HKCU\Software\DeepSkyStacker\DeepSkyStacker\PictureList\Settings
However I want it to be written to:
HKCU\Software\DeepSkyStacker\DeepSkyStacker5\PictureList\Settings
Does anyone know the necessary incantation to achieve this please?
Solution found!
ThanksCode:// // Set our Profile Name to DeepSkyStacker5 so native Windows registry stuff will be written under "DeepSkyStacker\\DeepSkyStacker5" // // First free the string allocated by MFC at CWinApp startup. // The string is allocated before InitInstance is called. free((void*)m_pszProfileName); // Change the name of the registry profile to use. // The CWinApp destructor will free the memory. m_pszProfileName = _tcsdup(_T("DeepSkyStacker5"));
David
Changing registry key used by Windows code (not mine) to store stuff.All my registry (QSettings) work for the new version is being written to HKCU/Software/DeepSkyStacker/DeepSkyStacker5Something is stubbornly writing toHKCU/Software/DeepSkyStacker/DeepSkyStackerWhat to I have to change in CWinApp to make it use the other section???
Last edited by perdrix; 09 May 2020 at 08:58.