#include "wx/config.h"
-#ifndef __WIN16__
-
#include "wx/msw/registry.h"
#include "wx/msw/regconf.h"
if ( bDoUseGlobal )
{
wxLogNull nolog;
- m_keyGlobalRoot.Open();
- m_keyGlobal.Open();
+ m_keyGlobalRoot.Open(wxRegKey::Read);
+ m_keyGlobal.Open(wxRegKey::Read);
}
}
// change current key(s)
m_keyLocal.SetName(m_keyLocalRoot, strRegPath);
- m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath);
- // don't create it right now, wait until it is accessed
- //m_keyLocal.Create();
+ if ( GetStyle() & wxCONFIG_USE_GLOBAL_FILE )
+ {
+ m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath);
- wxLogNull nolog;
- m_keyGlobal.Open();
+ wxLogNull nolog;
+ m_keyGlobal.Open(wxRegKey::Read);
+ }
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// deleting
// ----------------------------------------------------------------------------
-bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmptyAlso))
+
+bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso)
{
wxConfigPathChanger path(this, value);
if ( !m_keyLocal.DeleteValue(path.Name()) )
return FALSE;
- if ( m_keyLocal.IsEmpty() ) {
+ if ( bGroupIfEmptyAlso && m_keyLocal.IsEmpty() ) {
wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR);
SetPath(_T("..")); // changes m_keyLocal
return LocalKey().DeleteKey(strKey);
return bOk;
}
-#endif
- // __WIN16__
-
#endif
// wxUSE_CONFIG