Click here to Skip to main content
15,898,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why is there no cfind() in the std containers? Pin
Stefan_Lang15-Jun-11 23:19
Stefan_Lang15-Jun-11 23:19 
GeneralRe: Why is there no cfind() in the std containers? Pin
Craig Longman20-Jun-11 12:59
Craig Longman20-Jun-11 12:59 
Question[SOLVED]CWebBrowser2 not getting displayed on a dialog in a dll. [modified] Pin
chandu00414-Jun-11 11:26
chandu00414-Jun-11 11:26 
AnswerRe: CWebBrowser2 not getting displayed on a dialog in a dll. Pin
chandu00414-Jun-11 12:19
chandu00414-Jun-11 12:19 
AnswerRe: CWebBrowser2 not getting displayed on a dialog in a dll. Pin
pix_programmer14-Jun-11 21:08
pix_programmer14-Jun-11 21:08 
General[SOLUTION] Pin
chandu00417-Jun-11 11:19
chandu00417-Jun-11 11:19 
Questionconvert short to Cstring... Pin
spalanivel14-Jun-11 2:27
spalanivel14-Jun-11 2:27 
AnswerRe: convert short to Cstring... Pin
వేంకటనారాయణ(venkatmakam)14-Jun-11 2:37
వేంకటనారాయణ(venkatmakam)14-Jun-11 2:37 
GeneralRe: convert short to Cstring... Pin
Albert Holguin14-Jun-11 3:29
professionalAlbert Holguin14-Jun-11 3:29 
AnswerRe: convert short to Cstring... Pin
Richard MacCutchan14-Jun-11 2:41
mveRichard MacCutchan14-Jun-11 2:41 
AnswerRe: convert short to Cstring... Pin
Cool_Dev15-Jun-11 3:45
Cool_Dev15-Jun-11 3:45 
Question[SOLVED] Problem with adding set of strings from registry to combobox [modified] Pin
Gaurav Paul14-Jun-11 0:45
Gaurav Paul14-Jun-11 0:45 
AnswerRe: Problem with adding set of strings from registry to combobox Pin
Niklas L14-Jun-11 1:23
Niklas L14-Jun-11 1:23 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
Gaurav Paul14-Jun-11 2:00
Gaurav Paul14-Jun-11 2:00 
AnswerRe: Problem with adding set of strings from registry to combobox Pin
Richard MacCutchan14-Jun-11 2:39
mveRichard MacCutchan14-Jun-11 2:39 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
Gaurav Paul14-Jun-11 20:35
Gaurav Paul14-Jun-11 20:35 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
Richard MacCutchan14-Jun-11 21:48
mveRichard MacCutchan14-Jun-11 21:48 
GeneralRe: Problem with adding set of strings from registry to combobox [modified] Pin
Gaurav Paul14-Jun-11 22:52
Gaurav Paul14-Jun-11 22:52 
I appreciate your help.

The same code worked; as I did a silly mistake I needed to increase the drop down area Roll eyes | :rolleyes:

Thanks Thumbs Up | :thumbsup:
// *Code Starts Here

				HKEY phkResult = NULL;
				LONG enumresult = 0;
				TCHAR valuename[256]={0};
				BYTE valuedata[4096]={0};
				DWORD valuenamesize = sizeof(valuename);
				DWORD valuedatasize = sizeof(valuedata);
				
				if (RegOpenKeyEx(HKEY_CURRENT_USER,
				"Software\\MY_PROG_KEY",0,KEY_READ,&phkResult) == ERROR_SUCCESS)
				{

                                CComboBox* InsCombo;
				InsCombo = (CComboBox*) GetDlgItem(IDC_COMBO1);
				int index = 0;


				while(RegEnumValue(phkResult, index, valuename, &valuenamesize, 0,
				NULL,
				valuedata,
				&valuedatasize)!=ERROR_NO_MORE_ITEMS)

				{
			
				InsCombo->AddString(reinterpret_cast<const char*>(valuedata));

				index ++;
				
				}
				
				}

				
	RegCloseKey(phkResult);  
	return TRUE;  

	// *Code Ends Here


modified on Wednesday, June 15, 2011 5:20 AM

GeneralRe: Problem with adding set of strings from registry to combobox Pin
Richard MacCutchan14-Jun-11 23:05
mveRichard MacCutchan14-Jun-11 23:05 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
Gaurav Paul14-Jun-11 23:21
Gaurav Paul14-Jun-11 23:21 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
Richard MacCutchan15-Jun-11 0:38
mveRichard MacCutchan15-Jun-11 0:38 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
Gaurav Paul15-Jun-11 20:16
Gaurav Paul15-Jun-11 20:16 
QuestionRe: Problem with adding set of strings from registry to combobox Pin
David Crow14-Jun-11 4:42
David Crow14-Jun-11 4:42 
AnswerRe: Problem with adding set of strings from registry to combobox Pin
Gaurav Paul14-Jun-11 20:16
Gaurav Paul14-Jun-11 20:16 
GeneralRe: Problem with adding set of strings from registry to combobox Pin
David Crow15-Jun-11 2:04
David Crow15-Jun-11 2:04 

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.