Click here to Skip to main content
15,902,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to parse a file and store few strings in an array Pin
Faez Shingeri11-Feb-12 6:39
Faez Shingeri11-Feb-12 6:39 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan11-Feb-12 7:11
mveRichard MacCutchan11-Feb-12 7:11 
GeneralRe: How to parse a file and store few strings in an array Pin
Faez Shingeri12-Feb-12 19:19
Faez Shingeri12-Feb-12 19:19 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan12-Feb-12 21:39
mveRichard MacCutchan12-Feb-12 21:39 
GeneralRe: How to parse a file and store few strings in an array Pin
David Crow10-Feb-12 7:14
David Crow10-Feb-12 7:14 
QuestionDirectshow Pin
venkatesh528677-Feb-12 21:22
venkatesh528677-Feb-12 21:22 
AnswerRe: Directshow Pin
Richard MacCutchan7-Feb-12 22:31
mveRichard MacCutchan7-Feb-12 22:31 
QuestionAdd text to listbox using sendmessage, i'm baffled, c++ win32 Pin
jkirkerx7-Feb-12 10:03
professionaljkirkerx7-Feb-12 10:03 
I'm baffled here. I have a listbox that I can't send a message to, but if I change CreateWindowEx from Listbox to ComboBox, and change LB_ to CB_, it works fine.

So I have 6 hours into this, and it's time to ask for help. I can't think of anything. Changing the listbox to combobox was just an experiment because I tried everything I could think of, and was surprised it worked. Plus it validates that all my pointers are correct as well.

Here is my question:
I just looking for expert knowledge in how to diagnose this and get it to work as a listbox.

C#
// Site Administrator Listbox
lb_SetupWizard_CreateUser_LB_Field = CreateWindowEx(WS_EX_TRANSPARENT,
	TEXT("ListBox"),
	NULL,
	LBS_HASSTRINGS | WS_TABSTOP | WS_VSCROLL | WS_CHILD | WS_VISIBLE | ES_LEFT | ES_MULTILINE,
	50, 122,
	300, 220,
	hSetupWizard,
	(HMENU)IDC_SETUPWIZARD_CREATEUSER_LISTBOX_SELECT,
	GetModuleHandle(NULL),
	NULL
);
SendMessage(lb_SetupWizard_CreateUser_LB_Field, WM_SETFONT, (WPARAM)hFont_SetupWizard_Label, FALSE);
ShowWindow(lb_SetupWizard_CreateUser_LB_Field, SW_HIDE);


// This is inside a database function, that populates the listbox via a loop.
iPosition = SendMessage( lbUserAccounts, CB_ADDSTRING, 0, (LPARAM) szDescription );
SendMessage( lbUserAccounts, CB_SETITEMDATA, iPosition, (LPARAM) (int)pzUserID );

AnswerRe: Add text to listbox using sendmessage, i'm baffled, c++ win32 Pin
Wes Aday7-Feb-12 10:58
professionalWes Aday7-Feb-12 10:58 
GeneralNo it's not a typo Pin
jkirkerx7-Feb-12 11:31
professionaljkirkerx7-Feb-12 11:31 
GeneralRe: No it's not a typo Pin
Wes Aday7-Feb-12 11:55
professionalWes Aday7-Feb-12 11:55 
GeneralRe: No it's not a typo Pin
jkirkerx7-Feb-12 12:12
professionaljkirkerx7-Feb-12 12:12 
QuestionRe: Add text to listbox using sendmessage, i'm baffled, c++ win32 Pin
David Crow8-Feb-12 4:19
David Crow8-Feb-12 4:19 
AnswerRe: Add text to listbox using sendmessage, i'm baffled, c++ win32 Pin
jkirkerx8-Feb-12 6:17
professionaljkirkerx8-Feb-12 6:17 
AnswerNow it works, strange or I get it now Pin
jkirkerx8-Feb-12 7:22
professionaljkirkerx8-Feb-12 7:22 
AnswerRe: Now it works, strange or I get it now Pin
David Crow8-Feb-12 8:07
David Crow8-Feb-12 8:07 
GeneralRe: Now it works, strange or I get it now Pin
jkirkerx8-Feb-12 9:46
professionaljkirkerx8-Feb-12 9:46 
QuestionVirualiztion concept for Client Server windows application Pin
D.Manivelan6-Feb-12 20:00
D.Manivelan6-Feb-12 20:00 
AnswerRe: Virualiztion concept for Client Server windows application Pin
Albert Holguin6-Feb-12 21:40
professionalAlbert Holguin6-Feb-12 21:40 
GeneralRe: Virualiztion concept for Client Server windows application Pin
Nicolas Dorier7-Feb-12 0:24
professionalNicolas Dorier7-Feb-12 0:24 
GeneralRe: Virualiztion concept for Client Server windows application Pin
Jochen Arndt7-Feb-12 0:48
professionalJochen Arndt7-Feb-12 0:48 
SuggestionRe: Virualiztion concept for Client Server windows application Pin
Albert Holguin8-Feb-12 10:51
professionalAlbert Holguin8-Feb-12 10:51 
AnswerRe: Virualiztion concept for Client Server windows application Pin
Stefan_Lang9-Feb-12 1:28
Stefan_Lang9-Feb-12 1:28 
QuestionMultiple monitor support for MFC application Pin
Ashish Ranjan Mishra6-Feb-12 14:19
Ashish Ranjan Mishra6-Feb-12 14:19 
AnswerRe: Multiple monitor support for MFC application Pin
Albert Holguin6-Feb-12 16:43
professionalAlbert Holguin6-Feb-12 16:43 

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.