-bool wxFileConfig::Read(const wxString& key,
- wxString* pStr, const wxString& defVal) const
-{
- wxConfigPathChanger path(this, key);
-
- wxFileConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name());
- bool ok;
- if (pEntry == NULL) {
- if( IsRecordingDefaults() )
- ((wxFileConfig *)this)->Write(key,defVal);
- *pStr = ExpandEnvVars(defVal);
- ok = FALSE;
- }
- else {
- *pStr = ExpandEnvVars(pEntry->Value());
- ok = TRUE;
- }
-
- return ok;