//*********************************************************************** // (c) xqsoft,版权所有不得拷贝(2003) // IniFile.h // 功能:修改后的INI文件类,支持读写删除。 // 记录到INI格式文件 //*********************************************************************** #if !defined(AFX_INIFILE_H__D6BE0D97_13A8_11D4_A5D2_002078B03530__INCLUDED_) #define AFX_INIFILE_H__D6BE0D97_13A8_11D4_A5D2_002078B03530__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CIniFile { //all private variables private: //stores path of ini file to read/write TCHAR m_szFilePath[MAX_PATH]; //public functions public: //read value of int from ini file BOOL GetVarInt(LPCTSTR strSection,LPCTSTR strVarName,int & iValue); //read value of CString from ini file BOOL GetVarStr(LPCTSTR strSection,LPCTSTR strVarName,LPTSTR strReturnValue); //read value of CString from ini file BOOL GetVarStr(LPCTSTR strSection,LPCTSTR strVarName,CString & strValue); //重新设置变量整数型数值 BOOL SetVarInt(LPCTSTR strSection,LPCTSTR strVarName,const int iValue); //重新设置变量字符串型数值 BOOL SetVarStr(LPCTSTR strSection,LPCTSTR strVarName,LPCTSTR strValue); //sets path of ini file to read and write from void SetPath(LPCTSTR szPath); //default constructor CIniFile(); //default destructor virtual ~CIniFile(); }; #endif // !defined(AFX_INIFILE_H__D6BE0D97_13A8_11D4_A5D2_002078B03530__INCLUDED_)