registry.h

来自「AU1100嵌入式处理器lcd显示驱动程序」· C头文件 代码 · 共 54 行

H
54
字号
/*==========================================================================\
 *  REGISTRY.H --
 *  Copyright (c) Epson Research and Development, Inc. 2000, 2001
 *  All Rights Reserved.           
 *  Created 3-02-2000, Epson Research and Development, Inc.
 *---------------------------------------------------------------------------
 *  This source file contains the definition of the "Registry" class.
 *                                                                           
 *                                                                           
 * $Header: /home/devolder/.cvs/wince/DRIVERS/DISPLAY/au1100lcd/registry.h,v 1.1 2002/02/14 20:48:52 devolder Exp $                                                                  
 *                                                                           
 * Initial version.   (Doug McFadyen)
 *                                                                           
\*==========================================================================*/

class Registry
{
public:
	enum eKey   { Root, Active, nKeys };
	enum eValue { RegBase, MemBase, MediaPlug,
                  Width, Height, Bpp, Flags, Flags2, Rotation, Refresh, ActiveWidth, ActiveHeight,
                  ActiveBpp, ActiveFlags, ActiveFlags2, ActiveRotation, ActiveRefresh, nValues };

			Registry();
	virtual ~Registry();
	DWORD	GetNumber(eValue iReg, DWORD dwDefault);
	BOOL	SetNumber(eValue iReg, DWORD dwValue);
	int		GetString(eValue iReg, LPCTSTR lpszDefault, LPTSTR lpszString, int nString);
	int		SetString(eValue iReg, LPTSTR lpszString, int nString);
	int		GetBinary(eValue iReg, LPCVOID lpDefault, LPVOID lpBinary, int nBinary);
	bool	SetBinary(eValue iReg, LPCVOID lpBinary, int nBinary);

protected:
	HKEY	m_ahKeys[nKeys];

	struct Value
	{
		eValue	iReg;
		DWORD	dwType;
		eKey	iKey;
		LPCTSTR	lpszValue;
	};

	static const TCHAR *paszKeys[nKeys];
	static const Value aValues[nValues];

private:
	DWORD	m_dwBytes;
	DWORD	m_dwType;
	DWORD	m_dwData;
};


⌨️ 快捷键说明

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