📄 tzprofile.h
字号:
// tzProfile.h: interface for the CProfile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TZPROFILE_H__E9BB3E89_8535_4139_8F62_9F3B52828B29__INCLUDED_)
#define AFX_TZPROFILE_H__E9BB3E89_8535_4139_8F62_9F3B52828B29__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <Afxtempl.h>
#define KEY_ENTER 13
#define KEY_NEWLINE 10
#define CHARWIDTH sizeof(TCHAR)
class CProfile
{
public:
CProfile();
CProfile(LPCTSTR lpszFileName,LPCTSTR lpszSection);
~CProfile();
BOOL Open(LPCTSTR lpszFileName,LPCTSTR lpszSection);
VOID Close();
CString GetString(LPCTSTR lpszKeyName, LPCTSTR lpszDefault=_T(""));
INT GetInt(LPCTSTR lpszKeyName, INT nDefault);
VOID WriteString(LPCTSTR lpszKeyName, LPCTSTR lpszValue);
VOID WriteInt(LPCTSTR lpszKeyName, INT nValue);
private:
INT GetLine(CString &strLine);
INT LookUp(LPCTSTR lpszKeyName);
CString GetKeyName(LPCTSTR lpszKeyName,CString &strKeyName);
VOID ParseLine(CString strLine,CString &strName,CString &strValue);
INT Save();
private:
CFile m_File;
CString m_strSection;
BOOL m_bModified;
CArray<CString,CString&> m_rgKeyName;
CArray<CString,CString&> m_rgValue;
};
#endif // !defined(AFX_TZPROFILE_H__E9BB3E89_8535_4139_8F62_9F3B52828B29__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -