I create a dialog with a ComboBox(CComboBox m_replace). The dialog class name is CAskDlg.
In a member funcion of CView, I add these code:
CAskDlg askDlg;
askDlg.m_replace.AddString("Hello, world.");
askDlg.DoModal();
System show error message (abnormal terminal) while program run to AddString(). But if I put m_replace.AddString() in OnInitDialog(), it works well.
Why that error happens? Thanks!