Hi All,

I have two dialogs(IDD_DIALOG,IDD_DIALOG2).IDD_DIALOG is main dialog. I have create the second one in button click event of first dialog.

code is:

void CFirstDlg::OnBnClickedButton1()
{
this->ShowWindow(SW_HIDE);
SecondDlg *dlg=new SecondDlg (); //second dialog class
dlg->DoModal();
}


If i click the second dialog button. I need to hide the curron dialog(ie. IDD_DIALOG2) and show the first dialog with datas.


Please help me............


Regards,
Priya