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

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

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

Post 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
Post Reply