- wxConfigPathChanger path(this, szKey);
- wxString strKey = GetPrivateKeyName(path.Name());
-
- // hack: we have no mean to know if it really found the default value or
- // didn't find anything, so we call it twice
-
- static const int nMagic = 17; // 17 is some "rare" number
- static const int nMagic2 = 28; // arbitrary number != nMagic
- long lVal = 0; // = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename);
- if ( lVal != nMagic ) {
- // the value was read from the file
- *pl = lVal;
- return TRUE;
- }
-
- // is it really nMagic?
-// lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename);
- if ( lVal == nMagic2 ) {
- // the nMagic it returned was indeed read from the file
- *pl = lVal;
- return TRUE;
- }
-
- // no, it was just returning the default value, so now look in win.ini
-// *pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl);
-
- return TRUE;
+ wxConfigPathChanger path(this, szKey);
+ wxString strKey = GetPrivateKeyName(path.Name());
+
+ // hack: we have no mean to know if it really found the default value or
+ // didn't find anything, so we call it twice
+
+ static const int nMagic = 17; // 17 is some "rare" number
+ static const int nMagic2 = 28; // arbitrary number != nMagic
+ long lVal = 0; // = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename);
+
+ if ( lVal != nMagic )
+ {
+ // the value was read from the file
+ *pl = lVal;
+ return true;
+ }
+
+ // is it really nMagic?
+ // lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename);
+ if ( lVal == nMagic2 )
+ {
+ // the nMagic it returned was indeed read from the file
+ *pl = lVal;
+ return true;
+ }
+
+ // no, it was just returning the default value, so now look in win.ini
+ // *pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl);
+
+ return true;