CReg class

This article was submitted .

Wraps the Windows Registry API.
A small class, which gives easy access to the System Registry.

Break free of the limitations of the MFC app->WriteProfileString() programming style. With this little class you can easily access the Registry functions and still have full control of where the data goes.


SetRegistryBranchSets the current registry branch.
GetIntReads an integer from the system registry.
GetStringReads a string from the system registry.
GetBinaryReads a binary lump of data from the system registry.
WriteIntWrites an integer to the system registry.
WriteStringWrites a string to the system registry.
WriteBinaryWrites binary to the system registry.
WriteExpandStringWrites an 'expand string' to the system registry.
DeleteKeyDelete a registry key.
DeleteValueDelete a registry key value.
DeleteSectionDelete an entire registry branch.

Source Code Dependencies

Microsoft MFC Library

See Also

INI file wrapper class

Download Files

DownloadSource Code (4 Kb)

To the top