]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/registry.cpp
Some mouse events need to be handled even when outside the grid.
[wxWidgets.git] / src / msw / registry.cpp
index 55b6946d0debef469a70707c9c7a99820ed63381..612f0214676f42f217318df8754a7430a5df7d06 100644 (file)
@@ -143,7 +143,7 @@ const wxChar *wxRegKey::GetStdKeyShortName(size_t key)
 
 wxRegKey::StdKey wxRegKey::ExtractKeyName(wxString& strKey)
 {
-  wxString strRoot = strKey.Left(REG_SEPARATOR);
+  wxString strRoot = strKey.BeforeFirst(REG_SEPARATOR);
 
   HKEY hRootKey = 0;
   size_t ui;
@@ -444,6 +444,11 @@ bool wxRegKey::CopyValue(const wxChar *szValue,
                          wxRegKey& keyDst,
                          const wxChar *szValueNew)
 {
+    if ( !szValueNew ) {
+        // by default, use the same name
+        szValueNew = szValue;
+    }
+
     switch ( GetValueType(szValue) ) {
         case Type_String:
             {