X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..1e3eca9d3782d5eed5ba8d8019548c9f82523517:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index fbdb35b0e8..dca9790b5d 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -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