Click here to Skip to main content
15,881,812 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to write in windows registry Pin
Llasus20-Sep-07 22:02
Llasus20-Sep-07 22:02 
GeneralRe: How to write in windows registry Pin
Exelioindia21-Sep-07 0:09
Exelioindia21-Sep-07 0:09 
QuestionRe: How to write in windows registry Pin
David Crow21-Sep-07 2:51
David Crow21-Sep-07 2:51 
AnswerRe: How to write in windows registry Pin
nbugalia20-Sep-07 21:28
nbugalia20-Sep-07 21:28 
GeneralRe: How to write in windows registry Pin
Exelioindia20-Sep-07 21:50
Exelioindia20-Sep-07 21:50 
AnswerRe: How to write in windows registry Pin
Hamid_RT20-Sep-07 21:57
Hamid_RT20-Sep-07 21:57 
AnswerRe: How to write in windows registry Pin
ThatsAlok20-Sep-07 23:08
ThatsAlok20-Sep-07 23:08 
AnswerRe: How to write in windows registry Pin
Rahul Vaishnav21-Sep-07 1:03
Rahul Vaishnav21-Sep-07 1:03 
Use below function


BOOL WriteToRegistry(HKEY hRegRootPath, CString strRegPath, CString strRegAttribute, long lValue)
{
CRegKey key;
CString strAttributeValue;
strAttributeValue.Format("%u", lValue);
if(key.Create(hRegRootPath, strRegPath) == ERROR_SUCCESS)
{
if (key.SetValue(strAttributeValue,strRegAttribute) == ERROR_SUCCESS)
{
key.Close();
return TRUE;
}
}
return FALSE;
}


call the function as shown in example below...

WriteToRegistry(HKEY_LOCAL_MACHINE, "SOFTWARE\\ABC\\DEF", "NUM",1);





Rahul Vaishnav
GeneralRe: How to write in windows registry Pin
Exelioindia21-Sep-07 1:33
Exelioindia21-Sep-07 1:33 
GeneralRe: How to write in windows registry Pin
David Crow21-Sep-07 2:49
David Crow21-Sep-07 2:49 
General[Message Deleted] Pin
Californian221-Sep-07 5:57
Californian221-Sep-07 5:57 
GeneralRe: How to write in windows registry Pin
David Crow21-Sep-07 6:07
David Crow21-Sep-07 6:07 
GeneralRe: How to write in windows registry Pin
Rahul Vaishnav25-Sep-07 19:27
Rahul Vaishnav25-Sep-07 19:27 
Questionis there a way in MAPI to convert HTML to mime Pin
monsieur_jj20-Sep-07 20:05
monsieur_jj20-Sep-07 20:05 
QuestionAny suggestions? Pin
dellthinker20-Sep-07 20:00
dellthinker20-Sep-07 20:00 
AnswerRe: Any suggestions? Pin
John R. Shaw20-Sep-07 20:21
John R. Shaw20-Sep-07 20:21 
AnswerRe: Any suggestions? Pin
nbugalia20-Sep-07 20:51
nbugalia20-Sep-07 20:51 
QuestionRe: Any suggestions? Pin
David Crow21-Sep-07 2:53
David Crow21-Sep-07 2:53 
QuestionTimer in 10 Msec Pin
SURESH.SP20-Sep-07 19:42
SURESH.SP20-Sep-07 19:42 
AnswerRe: Timer in 10 Msec Pin
Cedric Moonen20-Sep-07 19:58
Cedric Moonen20-Sep-07 19:58 
AnswerRe: Timer in 10 Msec Pin
Roger Stoltz20-Sep-07 20:35
Roger Stoltz20-Sep-07 20:35 
AnswerRe: Timer in 10 Msec Pin
Randor 20-Sep-07 20:46
professional Randor 20-Sep-07 20:46 
AnswerRe: Timer in 10 Msec Pin
ThatsAlok20-Sep-07 23:11
ThatsAlok20-Sep-07 23:11 
Question[Solved] cleanup, DestroyWindow or OnDestroy? [modified] Pin
Hamed Musavi20-Sep-07 17:37
Hamed Musavi20-Sep-07 17:37 
AnswerRe: cleanup, DestroyWindow or OnDestroy? Pin
DevMentor.org20-Sep-07 18:12
DevMentor.org20-Sep-07 18:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.