|
/*****************************************************************************
* Change Log
* Date | Change
*-----------+-----------------------------------------------------------------
* 30-Aug-99 | [1.384] Created change log
* 30-Aug-99 | [1.384] Added RegistryGUID
* 26-Dec-99 | [1.387] REQ #134: Minor changes to handle Lint warnings
*****************************************************************************/
class RegistryVar {
public:
static void setInt(UINT id, int value, HKEY root = HKEY_CURRENT_USER);
static int getInt(UINT id, int def = 0, HKEY root = HKEY_CURRENT_USER);
static void setString(UINT id, LPCTSTR s, HKEY root = HKEY_CURRENT_USER);
static CString getString(UINT id, LPCTSTR def = NULL, HKEY root = HKEY_CURRENT_USER);
static void setGUID(UINT id, const GUID & value, HKEY root = HKEY_CURRENT_USER);
static GUID getGUID(UINT id, GUID * def, HKEY root = HKEY_CURRENT_USER);
protected:
UINT id;
HKEY root;
};
/*lint -e1735 */
class RegistryInt : public RegistryVar {
public:
RegistryInt(UINT n, HKEY r = HKEY_CURRENT_USER ) {id = n; root = r; value = 0; } // REQ #134
int value; // the value
virtual int load(int def = 0);
virtual void store();
};
class RegistryString : public RegistryVar {
public:
RegistryString(UINT n, HKEY r = HKEY_CURRENT_USER) {id = n; root = r; }
CString value; // the value
virtual CString load(LPCTSTR def = NULL);
virtual void store();
};
#ifdef GUID_DEFINED
class RegistryGUID : public RegistryVar {
public:
RegistryGUID(UINT n, HKEY r = HKEY_CURRENT_USER) {id = n; root = r; }
GUID value; // the value
virtual GUID * load(GUID * def = NULL);
virtual void store();
};
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here