Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading/writing a single bool value to the registry

Status
Not open for further replies.

BungoMan

Programmer
May 13, 2002
12
0
0
US
ive dont a little research on this but havent found anything that really tells just how to do this one thing, and that is when my program loads check the registry to see if there is a bool value set to 1 at a certain key, if not execute a segement of code, if everything goes ok there create the key and a bool value and set it to 1, then do the rest of the program

as far as i can gather i need to create a HWIN handle and then try and read the value of something at a certain key, only problem is that the only examples ive seen involve writing strings, and thats not what i need to do =/, so if any one out there could either point me to a place with a good example of this or show me the lines of code needed to read the registry key (if it doesnt exist DONT create it), and then the part to write to it, i already know everything else in my program that i need to do, i just want to save the settings in the registry (because thats where id like to put settings for all future programs from now on)
 
Hi!

If you use Visual Studio and MFC, for BOOL and bool Data Type you best use the Command WriteProfileInt().

Greetings
Remo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top