1 Star 1 Fork 2

今夜无眠/GNSS_Viewer_V2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Registry.h 2.12 KB
一键复制 编辑 原始数据 按行查看 历史
Alex Lin 提交于 2014-08-22 15:48 . Revert "Revert "First commit""
#ifndef __REGISTRY_H__
#define __REGISTRY_H__
class CRegistry
{
public:
CRegistry();
~CRegistry();
int m_nLastError;
// CRegistry properties
protected:
HKEY m_hRootKey;
BOOL m_bLazyWrite;
CString m_strCurrentPath;
public:
inline BOOL PathIsValid() {
return (m_strCurrentPath.GetLength() > 0); }
inline CString GetCurrentPath() {
return m_strCurrentPath; }
inline HKEY GetRootKey() {
return m_hRootKey; }
//CRegistry methods
public:
BOOL ClearKey();
BOOL SetRootKey(HKEY hRootKey);
BOOL CreateKey(CString strKey);
BOOL DeleteKey(CString strKey);
BOOL DeleteValue(CString strName);
int GetDataSize(CString strValueName);
DWORD GetDataType(CString strValueName);
int GetSubKeyCount();
int GetValueCount();
BOOL KeyExists(CString strKey, HKEY hRootKey = NULL);
BOOL SetKey(CString strKey, BOOL bCanCreate);
BOOL ValueExists(CString strName);
void RenameValue(CString strOldName, CString strNewName);
// data reading functions
COleDateTime ReadDateTime(CString strName, COleDateTime dtDefault);
double ReadFloat(CString strName, double fDefault);
CString ReadString(CString strName, CString strDefault);
int ReadInt(CString strName, int nDefault);
BOOL ReadBool(CString strName, BOOL bDefault);
COLORREF ReadColor(CString strName, COLORREF rgbDefault);
BOOL ReadFont(CString strName, CFont* pFont);
BOOL ReadPoint(CString strName, CPoint* pPoint);
BOOL ReadSize(CString strName, CSize* pSize);
BOOL ReadRect(CString strName, CRect* pRect);
DWORD ReadDword(CString strName, DWORD dwDefault);
// data writing functions
BOOL WriteBool(CString strName, BOOL bValue);
BOOL WriteDateTime(CString strName, COleDateTime dtValue);
BOOL WriteString(CString strName, CString strValue);
BOOL WriteFloat(CString strName, double fValue);
BOOL WriteInt(CString strName, int nValue);
BOOL WriteColor(CString strName, COLORREF rgbValue);
BOOL WriteFont(CString strName, CFont* pFont);
BOOL WritePoint(CString strName, CPoint* pPoint);
BOOL WriteSize(CString strName, CSize* pSize);
BOOL WriteRect(CString strName, CRect* pRect);
BOOL WriteDword(CString strName, DWORD dwValue);
};// end of CRegistry class definition
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/null_130_5865/GNSS_Viewer_V2.git
[email protected]:null_130_5865/GNSS_Viewer_V2.git
null_130_5865
GNSS_Viewer_V2
GNSS_Viewer_V2
master

搜索帮助