Click here to Skip to main content
16,005,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with ODBC connection Pin
David Crow15-Jan-07 3:12
David Crow15-Jan-07 3:12 
AnswerRe: Problem with ODBC connection Pin
Jackson8617-Jan-07 2:30
Jackson8617-Jan-07 2:30 
QuestionHow to pass array to function? Pin
Ming Luo11-Jan-07 5:48
Ming Luo11-Jan-07 5:48 
AnswerRe: How to pass array to function? Pin
Nemanja Trifunovic11-Jan-07 6:04
Nemanja Trifunovic11-Jan-07 6:04 
AnswerRe: How to pass array to function? Pin
Mark Salsbery11-Jan-07 6:10
Mark Salsbery11-Jan-07 6:10 
AnswerRe: How to pass array to function? Pin
Cedric Moonen11-Jan-07 7:43
Cedric Moonen11-Jan-07 7:43 
QuestionInsert value from GUI CString into Registry Pin
trumper11-Jan-07 5:46
trumper11-Jan-07 5:46 
AnswerRe: Insert value from GUI CString into Registry Pin
Joan M11-Jan-07 6:17
professionalJoan M11-Jan-07 6:17 
I use this code...

bool	CRegistry::SetKey(HKEY hKey, CString csSubkey, CString csValName, CString csVal)
{
	if(hKey != HKEY_CURRENT_USER)
		return false;

	if(csSubkey.IsEmpty() || csValName.IsEmpty() || csVal.IsEmpty())
		return false;

	HKEY hWkKey;
	LONG lRetorn = RegOpenKeyEx(hKey,csSubkey,0,KEY_ALL_ACCESS,&hWkKey);
	if(lRetorn == ERROR_SUCCESS)
	{
		int iLength = csVal.GetLength();
		lRetorn = RegSetValueEx(hWkKey,
									csValName,
									0, 
									REG_SZ, 
									(BYTE *)csVal.GetBuffer(0),
									iLength);

		RegFlushKey(hWkKey);
		RegCloseKey(hWkKey);

		if( lRetorn == ERROR_SUCCESS)
			return true;
	}
	return false;
}


Hope this helps.
AnswerRe: Insert value from GUI CString into Registry Pin
Mark Salsbery11-Jan-07 6:18
Mark Salsbery11-Jan-07 6:18 
AnswerRe: Insert value from GUI CString into Registry Pin
led mike11-Jan-07 6:18
led mike11-Jan-07 6:18 
GeneralRe: Insert value from GUI CString into Registry Pin
Mark Salsbery11-Jan-07 6:26
Mark Salsbery11-Jan-07 6:26 
GeneralRe: Insert value from GUI CString into Registry Pin
trumper11-Jan-07 14:46
trumper11-Jan-07 14:46 
JokeRe: Insert value from GUI CString into Registry Pin
Rajesh R Subramanian11-Jan-07 20:47
professionalRajesh R Subramanian11-Jan-07 20:47 
QuestionMFC Grid - GVN_ENDLABELEDIT message not firing [SOLVED] Pin
#realJSOP11-Jan-07 4:43
professional#realJSOP11-Jan-07 4:43 
QuestionWhat is the handle count for a process in windows? Pin
Gupta Suraj11-Jan-07 2:40
Gupta Suraj11-Jan-07 2:40 
AnswerRe: What is the handle count for a process in windows? Pin
Rajesh R Subramanian11-Jan-07 2:49
professionalRajesh R Subramanian11-Jan-07 2:49 
GeneralRe: What is the handle count for a process in windows? Pin
Gupta Suraj11-Jan-07 2:50
Gupta Suraj11-Jan-07 2:50 
GeneralRe: What is the handle count for a process in windows? Pin
Rajesh R Subramanian11-Jan-07 2:57
professionalRajesh R Subramanian11-Jan-07 2:57 
GeneralRe: What is the handle count for a process in windows? Pin
Maximilien11-Jan-07 3:41
Maximilien11-Jan-07 3:41 
GeneralRe: What is the handle count for a process in windows? Pin
Rajesh R Subramanian11-Jan-07 17:57
professionalRajesh R Subramanian11-Jan-07 17:57 
AnswerRe: What is the handle count for a process in windows? Pin
David Leyva11-Jan-07 10:24
David Leyva11-Jan-07 10:24 
AnswerRe: What is the handle count for a process in windows? Pin
Hamid_RT11-Jan-07 20:58
Hamid_RT11-Jan-07 20:58 
GeneralRe: What is the handle count for a process in windows? Pin
Gupta Suraj11-Jan-07 22:33
Gupta Suraj11-Jan-07 22:33 
QuestionCreating .ico file from HICON Pin
neilsolent11-Jan-07 2:22
neilsolent11-Jan-07 2:22 
AnswerRe: Creating .ico file from HICON Pin
tudorbalan10-Dec-10 1:17
tudorbalan10-Dec-10 1:17 

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.