Let's say I've got a OnLClick(...) in which I want to popup a dialog (created with the resource-editor)
and before doing a DoModal(); I want to set the CComboBox, which is a control of the dialog, to a
specific value... but it keeps crashing at SetCurSel:

CTestDlg *dlg=new CTestDlg(this);
dlg->m_combo.SetCurSel(0);
dlg->DoModal();

m_combo is a member-variable (control) of the dialog. I've also tried to get the control:

CTestDlg *dlg=new CTestDlg(this);
CComboBox *cb=(CComboBox *)dlg->GetDlgItem(IDC_COMBO1);

But here, the GetDlgItem crashes... I feel that I'm doing something completely wrong, but
I have no clue... could anybody please help me?

Thank you!


-.-.-