-
Using registry keys
Is there any place to look for the functions I need to use to set and READ registry entries. CWinApp contains the SetRegistryKey() method but seems to have no facility to read them. Does this seem odd to anyone else? What good is setting a key if you never read it !?! Just wondering.
Kyle
-
Re: Using registry keys
There are a whole family of functions that start with Reg... I think RegQueryValue is the one you want.
--michael
-
Re: Using registry keys
The built-in registry functions can only read and write strings and ints. I've written a Registry class that can read and write any type of value (bool, short, string, double, etc.) Additionally, it takes care of error checking\handling as well. I can send you the source code for it tomorrow if you want. The class is very easy to use, as it takes care of all the internal details.
example:
Registry registry( key);
bool b;
double d;
b = registry.read("value 1");
d = registry.read("value 2");
registry.write("value 3", "string value");
registry.write("value 4", 99999);