Click here to Skip to main content
14,265,813 members

C / C++ / MFC

 
Question"undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 7:19
memberVaclav_4-Dec-18 7:19 
AnswerRe: "undefined reference " error - what am I missing ? Pin
leon de boer4-Dec-18 7:36
memberleon de boer4-Dec-18 7:36 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 7:50
memberVaclav_4-Dec-18 7:50 
QuestionRe: "undefined reference " error - what am I missing ? Pin
Richard MacCutchan4-Dec-18 8:55
protectorRichard MacCutchan4-Dec-18 8:55 
AnswerRe: "undefined reference " error - what am I missing ? Pin
Joe Woodbury4-Dec-18 9:02
professionalJoe Woodbury4-Dec-18 9:02 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 12:33
memberVaclav_4-Dec-18 12:33 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Joe Woodbury4-Dec-18 12:36
professionalJoe Woodbury4-Dec-18 12:36 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 15:15
memberVaclav_4-Dec-18 15:15 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Joe Woodbury4-Dec-18 18:48
professionalJoe Woodbury4-Dec-18 18:48 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_5-Dec-18 4:35
memberVaclav_5-Dec-18 4:35 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Richard MacCutchan4-Dec-18 22:00
protectorRichard MacCutchan4-Dec-18 22:00 
QuestionString Search In C++ Pin
Hack Baba4-Dec-18 6:07
memberHack Baba4-Dec-18 6:07 
AnswerRe: String Search In C++ Pin
jeron14-Dec-18 6:10
memberjeron14-Dec-18 6:10 
GeneralRe: String Search In C++ Pin
Hack Baba4-Dec-18 6:21
memberHack Baba4-Dec-18 6:21 
GeneralRe: String Search In C++ Pin
jeron14-Dec-18 7:49
memberjeron14-Dec-18 7:49 
AnswerRe: String Search In C++ Pin
Richard MacCutchan4-Dec-18 6:33
protectorRichard MacCutchan4-Dec-18 6:33 
GeneralRe: String Search In C++ Pin
Hack Baba4-Dec-18 6:45
memberHack Baba4-Dec-18 6:45 
GeneralRe: String Search In C++ Pin
Richard MacCutchan4-Dec-18 8:49
protectorRichard MacCutchan4-Dec-18 8:49 
AnswerRe: String Search In C++ Pin
Joe Woodbury4-Dec-18 9:04
professionalJoe Woodbury4-Dec-18 9:04 
GeneralRe: String Search In C++ Pin
Hack Baba4-Dec-18 23:58
memberHack Baba4-Dec-18 23:58 
GeneralRe: String Search In C++ Pin
Joe Woodbury5-Dec-18 6:21
professionalJoe Woodbury5-Dec-18 6:21 
SuggestionRe: String Search In C++ Pin
David Crow5-Dec-18 2:54
memberDavid Crow5-Dec-18 2:54 
QuestionCComobox::DrawItem list box entries Disappears In Release Mode Pin
ForNow3-Dec-18 16:10
memberForNow3-Dec-18 16:10 
AnswerRe: CComobox::DrawItem list box entries Disappears In Release Mode Pin
leon de boer3-Dec-18 17:43
memberleon de boer3-Dec-18 17:43 
GeneralRe: CComobox::DrawItem list box entries Disappears In Release Mode Pin
ForNow4-Dec-18 1:44
memberForNow4-Dec-18 1:44 
the only thing I can come with first is this piece of code
I only display part of the string in the list box

void Casidcombo::DrawItem(LPDRAWITEMSTRUCT pdi)
{
	ASSERT(pdi->CtlType == ODT_COMBOBOX);
	LPCTSTR lpszText = (LPCTSTR)pdi->itemData;
	
	ASSERT(lpszText == NULL);
	CDC dc;
	CWnd* phwnd = CWnd::FromHandle(pdi->hwndItem);

	dc.Attach(pdi->hDC);
	CString str(lpszText,8);   // Get the first 8 charcaters

and later write it out
// Draw the text.
	dc.DrawText(
		str,
		(int)_tcslen(str),
	         &pdi->rcItem,
	 	 DT_CENTER | DT_SINGLELINE | DT_VCENTER);


However str is on the stack and would disappear after exiting draw item ?
I'll try it out

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.