+#endif
+
+// TODO: vendor name is ignored, because we can't yet do the test for optional vendor
+// name in the constructor body. We need a wxRegKey::Set that takes the same
+// args as the constructor. Then we'll set m_keyLocalRoot etc. in the constructor body.
+
+wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName,
+ const wxString& strLocal, const wxString& strGlobal, long style)
+ : wxConfigBase(appName, vendorName, strLocal, strGlobal, style),
+
+ m_keyLocalRoot(wxRegKey::HKCU, SOFTWARE_KEY + appName),
+ m_keyLocal(m_keyLocalRoot, ""),
+ m_keyGlobalRoot(wxRegKey::HKLM, SOFTWARE_KEY + appName),
+ m_keyGlobal(m_keyGlobalRoot, "")
+{
+ // TODO: really, we should check and supply an app name if one isn't supplied.
+ // Unfortunately I don't know how to initialise the member wxRegKey
+ // variables from within the constructor body. -- JACS
+ // Vadim - we just need an implementation of wxRegKey::Set,
+ // and then we can uncomment this and remove the constructor lines above.
+/*
+ wxString strRoot(appName);
+ if (appName.IsEmpty() && wxTheApp)
+ {
+ strRoot = wxTheApp->GetAppName();
+ }
+ wxASSERT( !strRoot.IsEmpty() );
+
+ if (!vendorName.IsEmpty())
+ {
+ strRoot += "\\";
+ strRoot += vendorName;
+ }
+
+ m_keyLocalRoot.Set(wxRegKey::HKCU, SOFTWARE_KEY + strRoot),
+ m_keyLocal.Set(m_keyLocalRoot, ""),
+
+ m_keyGlobalRoot.Set(wxRegKey::HKLM, SOFTWARE_KEY + strRoot),
+ m_keyGlobal.Set(m_keyGlobalRoot, "")
+*/
+
+ // Create() will Open() if key already exists
+ m_keyLocalRoot.Create();
+
+ // as it's the same key, Open() shouldn't fail (i.e. no need for Create())
+ m_keyLocal.Open();
+
+ wxLogNull nolog;
+ m_keyGlobalRoot.Open();
+
+}