philrosenberg
Technical User
Hi all
This seems like it should be so easy yet I can't get it to work. I'm using microsoft visual c++ to create a dialog based application.
I've created one dialog box resource with a listbox in. Then added a CListBox object associated with it called m_list.
All I want to do is when the dialog opens have a list of various strings in the box so I'm doing something like.
CString String1 = "First list item"
CDlgList MyListDialog;
MyListDialog.m_list.AddString(string1);
however I'm getting a "debug assertion failed" error. Any ideas why, any help much appreciated.
This seems like it should be so easy yet I can't get it to work. I'm using microsoft visual c++ to create a dialog based application.
I've created one dialog box resource with a listbox in. Then added a CListBox object associated with it called m_list.
All I want to do is when the dialog opens have a list of various strings in the box so I'm doing something like.
CString String1 = "First list item"
CDlgList MyListDialog;
MyListDialog.m_list.AddString(string1);
however I'm getting a "debug assertion failed" error. Any ideas why, any help much appreciated.