Page 1 of 1

[wxMSW 2.5.3 - VS.net] wxRegConfig global config problem.

Posted: Tue Oct 12, 2004 1:41 pm
by Cursor
I want to use wxRegConfig (the default wxConfig on Windows) to store data.

I create two wxConfig objects : a global and a local :

Code: Select all

SetAppName("MyApp");
SetVendorName("Me");
m_pConfig = new wxConfig(wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
m_pConfigGlobal = new wxConfig(wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE);
And I try to write data :

Code: Select all

m_pConfig->Write("test", "user");
m_pConfigGlobal->Write("test", "global");
And when I try to read the local data : it read "global" and not "local". Moreover if I change of Windows login, the value is not found or when I look at the registry, my global key is assign to the user registry branch and not the "local machine" one.

Is it a bug ?

Thx