⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regkey.h

📁 此书包含了大量的VC程序源代码,对于学习者来说是非常重要的,看后大家对VC将会有质的提高.非常经典.
💻 H
字号:
#ifndef REGKEY_INCLUDE_
#define REGKEY_INCLUDE_
#include "winreg.h"

class CRegKey
{
public:
	CRegKey();
	virtual ~CRegKey();

public:
    LONG Open (HKEY hKeyRoot, LPCTSTR pszPath);
    void Close();

	LONG Write (LPCTSTR pszKey, DWORD dwVal);
	LONG Write (LPCTSTR pszKey, LPCTSTR pszVal);
	LONG Write (LPCTSTR pszKey, const BYTE* pData, DWORD dwLength);

	LONG Read (LPCTSTR pszKey, DWORD& dwVal);
	LONG Read (LPCTSTR pszKey, CString& sVal);
	LONG Read (LPCTSTR pszKey, BYTE* pData, DWORD& dwLength);

    LONG GetEnumKeys(HKEY hKeyRoot, LPCTSTR pszPath, CStringArray &strArray);
    LONG GetEnumValues(HKEY hKeyRoot, LPCTSTR pszPath, CStringArray &strArray);

protected:
	HKEY 	m_hKey;
	CString m_strPath;
};

#endif  //-REGKEY_INCLUDE_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -