hi all, i just started using MFC to develop a small dialog based application on pocket PC. im using embedded visual c++ 4.0. my question is, after loading the initial screen(dialog box), how can i switch to another dialog box. i had the following code:
m_pMainWnd = &dlg1;
int nResponse = dlg1.DoModal();
if (nResponse == IDOK)
m_pMainWnd = &dlg2;
the fist dialog box closes successfully, but the second dialog box doesn't show up onto the screen and it seems like the program terminates after then. CFirstDlg is created by the wizard at the beginning as the initial screen. im thinking maybe there's something i have to declare in the defination of CSecondDlg class. but im not sure exactly what. some sample code is welcomed. thanks in advance.