Hello,
I'm having trouble retreiving data from control variables in dialog box. My dialog box class has one control variable, CComboBox c_box. Here's some code:
But this crashes at the call to GetLBText(); I get a debug assetion failed error. Why is this happening?Code:void MyView::OnItemClick() { MyDialog dlg(this); char tmp[10]; int num; if(dlg.DoModal() == IDOK) { dlg.c_box.GetLBText(dlg.c_box.GetCurSel(), tmp); num = atoi(tmp); } }
Thanks.