Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: bad_alloc in new Pin
Hamid_RT27-Jan-08 20:37
Hamid_RT27-Jan-08 20:37 
GeneralRe: bad_alloc in new Pin
George_George27-Jan-08 20:47
George_George27-Jan-08 20:47 
QuestionHow do you put a "FLOAT" number into a dialog's editbox? Pin
Larry Mills Sr26-Jan-08 11:32
Larry Mills Sr26-Jan-08 11:32 
AnswerRe: How do you put a "FLOAT" number into a dialog's editbox? Pin
PJ Arends26-Jan-08 20:12
professionalPJ Arends26-Jan-08 20:12 
GeneralRe: How do you put a "FLOAT" number into a dialog's editbox? Pin
Larry Mills Sr30-Jan-08 8:18
Larry Mills Sr30-Jan-08 8:18 
AnswerRe: How do you put a "FLOAT" number into a dialog's editbox? Pin
Hamid_RT27-Jan-08 20:35
Hamid_RT27-Jan-08 20:35 
GeneralOpenUrl() with PostData Question Pin
Lucky the code machine26-Jan-08 9:13
Lucky the code machine26-Jan-08 9:13 
GeneralAdding items to a list box in a dialog. [modified] Pin
Ben Aldhouse26-Jan-08 4:30
Ben Aldhouse26-Jan-08 4:30 
The following refers to an application I am writing in VC++ 6.

I want to add some items to a list box in a dialog. I understand that this involves something called DDX, which, as far as I am aware is something that the IDE sorts out for me.

I have added a public variable to the dialog class via the Class Wizard to be associated with the List box - m_listGTTimeUnits.

Now, the application is a Windows Explorer style application and the dialog appears when I right-click over the right hand pane.

I have tried a couple of ways to add values to the list box, both of which allow the code to compile but cause the program to crash with the message "Debug assertion failed" when the dialog is called...

Firstly...
<br />
void CRightView::OnRightmenuEditnode() <br />
{<br />
...<br />
	CEditNodeDlg dlg;<br />
	dlg.m_listGTTimeUnits.AddString("days");<br />
...


and secondly
<br />
void CRightView::OnRightmenuEditnode() <br />
{<br />
...	<br />
	CListBox * pList = (CListBox*) dlg.GetDlgItem(IDC_LISTLTTIMEUNITS);<br />
	pList->AddString("days");<br />
...<br />

If anyone has any idea of what it is that I am doing wrong, I would be very glad to hear!

Thanks,

Ben.

modified on Saturday, January 26, 2008 10:47:25 AM

QuestionRe: Adding items to a list box in a dialog. Pin
CPallini26-Jan-08 5:00
mveCPallini26-Jan-08 5:00 
GeneralRe: Adding items to a list box in a dialog. Pin
Ben Aldhouse26-Jan-08 5:55
Ben Aldhouse26-Jan-08 5:55 
GeneralRe: Adding items to a list box in a dialog. Pin
CPallini26-Jan-08 6:14
mveCPallini26-Jan-08 6:14 
GeneralRe: Adding items to a list box in a dialog. Pin
Ben Aldhouse26-Jan-08 6:15
Ben Aldhouse26-Jan-08 6:15 
GeneralRe: Adding items to a list box in a dialog. Pin
Ben Aldhouse26-Jan-08 6:14
Ben Aldhouse26-Jan-08 6:14 
GeneralHooking Pin
dellthinker26-Jan-08 0:33
dellthinker26-Jan-08 0:33 
GeneralRe: Hooking Pin
CPallini26-Jan-08 2:07
mveCPallini26-Jan-08 2:07 
GeneralRe: Hooking Pin
Nitheesh George27-Jan-08 19:14
Nitheesh George27-Jan-08 19:14 
GeneralRe: Hooking Pin
CPallini27-Jan-08 22:22
mveCPallini27-Jan-08 22:22 
GeneralRe: Hooking Pin
Nitheesh George28-Jan-08 16:21
Nitheesh George28-Jan-08 16:21 
Questionhow to assign an array value to another Pin
gentleguy25-Jan-08 22:55
gentleguy25-Jan-08 22:55 
AnswerRe: how to assign an array value to another [modified] Pin
CPallini25-Jan-08 23:30
mveCPallini25-Jan-08 23:30 
GeneralRe: how to assign an array value to another Pin
gentleguy26-Jan-08 0:18
gentleguy26-Jan-08 0:18 
GeneralRe: how to assign an array value to another Pin
CPallini26-Jan-08 1:59
mveCPallini26-Jan-08 1:59 
GeneralRe: how to assign an array value to another Pin
gentleguy26-Jan-08 2:17
gentleguy26-Jan-08 2:17 
QuestionRe: how to assign an array value to another Pin
CPallini26-Jan-08 2:26
mveCPallini26-Jan-08 2:26 
GeneralRe: how to assign an array value to another Pin
gentleguy26-Jan-08 2:29
gentleguy26-Jan-08 2:29 

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.