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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create REG_DWORD registry entry HELP!

Status
Not open for further replies.

Burtlancaster

Programmer
Jul 22, 2004
12
GB
Can anyone help me to make a REG_DWORD registry entry. I'am quite cable of creating a REG_SZ and a REG_BINARY using the following methods:
Code:
TRegistry *Reg = new TRegistry;
Reg->RootKey = HKEY_CLASSES_ROOT; // Set the root key to HKEY_CLASSES_ROOT
int Buffer = 65536;

Reg->OpenKey(".ggc", true); // Now open the key, with the possibility to
                            // create the key if it doesn't exist.
Reg->WriteString("", "ggcfile");// Write my file type to it.
Reg->CloseKey();

Reg->OpenKey("ggcfile", true); // create an association for that file type
Reg->WriteString("", "Gear Data file");
Reg->WriteBinaryData("EditFlags", &Buffer, 4);
 
Well about 5 minutes after putting up this post I found the answer which is really simple but I didnt notice it staring me right in the face for all you people out there also having the same problem (if any at all) here is the answer:

Code:
Reg->WriteInteger("FileTypes", 16);
//"FileType" being the value name and "16" being
//the 16 being the decimal value
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top