X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..7309b92dd71901b8c96dea3e48e57a6c21d072a4:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index fbdb35b0e8..fe8897463e 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -302,7 +302,7 @@ wxString wxRegKey::GetName(bool bShortPrefix) const return str; } -#ifdef __GNUWIN32__ +#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS) bool wxRegKey::GetKeyInfo(size_t* pnSubKeys, size_t* pnMaxKeyLen, size_t* pnValues, @@ -532,6 +532,18 @@ bool wxRegKey::HasValue(const wxChar *szValue) const #endif // WIN16/32 } +// returns TRUE if this key has any values +bool wxRegKey::HasValues() const +{ + // suppress possible messages from GetFirstValue() + wxLogNull nolog; + + // just call GetFirstValue with dummy parameters + wxString str; + long l; + return CONST_CAST GetFirstValue(str, l); +} + // returns TRUE if this key has any subkeys bool wxRegKey::HasSubkeys() const { @@ -718,8 +730,7 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const wxChar szValueName[1024]; // @@ use RegQueryInfoKey... DWORD dwValueLen = WXSIZEOF(szValueName); - lIndex++; - m_dwLastError = RegEnumValue((HKEY) m_hKey, lIndex, + m_dwLastError = RegEnumValue((HKEY) m_hKey, lIndex++, szValueName, &dwValueLen, RESERVED, NULL, // [out] type