📄 registry.h
字号:
#if !defined _REG_H
#define _REG_H
/************************************************************************
* 文件名: reg.h
* 文件描述: 注册表读写
*************************************************************************/
class CRegistry : public CObject
{
public:
CRegistry(HKEY hRootKey = HKEY_LOCAL_MACHINE); //构造函数带有默认参数
virtual ~CRegistry();
public:
BOOL VerifyKey (LPCTSTR pszPath);
BOOL VerifyValue (LPCTSTR pszValue);
BOOL CreateKey (LPCTSTR pszPath);
void Close();
BOOL DeleteValue (LPCTSTR pszValue);
BOOL DeleteKey (LPCTSTR pszPath);
BOOL Write (LPCTSTR pszKey, int iVal);
BOOL Write (LPCTSTR pszKey, DWORD dwVal);
BOOL Write (LPCTSTR pszKey, LPCTSTR pszVal);
BOOL Read (LPCTSTR pszKey, int& iVal);
BOOL Read (LPCTSTR pszKey, DWORD& dwVal);
BOOL Read (LPCTSTR pszKey, CString& sVal);
BOOL IsEqual(LPCTSTR pszValue,int nn);
BOOL IsEqual(LPCTSTR pszValue,DWORD dw);
BOOL IsEqual(LPCTSTR pszValue,LPCTSTR lpsz);
protected:
HKEY m_hSubKey; //保存打开的子键句柄
HKEY m_hRootKey; //保存根键句柄
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -