]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/registry.cpp
Added in-place editiging in wxListCtrl
[wxWidgets.git] / src / msw / registry.cpp
index f40064ae68695cc6ae832d7d81d60d84b3348b62..1fcc78c55f926aa263b3b8a403cfd0164cf72e73 100644 (file)
@@ -297,10 +297,17 @@ wxString wxRegKey::GetName(bool bShortPrefix) const
   return str;
 }
 
+#ifdef __GNUWIN32__
+bool wxRegKey::GetKeyInfo(uint* pnSubKeys,
+                          uint* pnMaxKeyLen,
+                          uint* pnValues,
+                          uint* pnMaxValueLen) const
+#else
 bool wxRegKey::GetKeyInfo(ulong *pnSubKeys,
                           ulong *pnMaxKeyLen,
                           ulong *pnValues,
                           ulong *pnMaxValueLen) const
+#endif
 {
 #ifdef  __WIN32__
   m_dwLastError = ::RegQueryInfoKey
@@ -589,6 +596,7 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const
         RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize);
         m_dwLastError = RegQueryValueEx(m_hKey, szValue, RESERVED, 
                                         &dwType, pBuf, &dwSize);
+        strValue.UngetWriteBuf();
         if ( m_dwLastError == ERROR_SUCCESS ) {
           // check that it was the right type
           wxASSERT_MSG( dwType == REG_SZ, 
@@ -602,6 +610,7 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const
       wxASSERT( IsEmpty(szValue) );
 
       m_dwLastError = RegQueryValue(m_hKey, 0, strValue.GetWriteBuf(256), &l);
+      strValue.UngetWriteBuf();
       if ( m_dwLastError == ERROR_SUCCESS )
         return TRUE;
     #endif  //WIN16/32