views:

37

answers:

0

Hi,

I want to open a separate dialog box when I cllick on a button on my main dialog. I used separateDialog.DoModal() to do it. It open successfully but when I try to add data to a edit control (text box) in that seperate dialog, a debug assertion failure occurs. What is the matter and how can I overcome it?

This is what I did: void CListCtrlTestDlg::OpenSettings()

{

ConfigDialog confDlg;

confDlg.DoModal();

confDlg.ReadData()//This is where the problem comes!!

}

ConfigDialog is the class of the new Dialog I want to open.

ReadData() reads from a config file. OpenSettings() method is called when I click a button on the first dialog.

Thanks a lot!