I'm trying to run two windows in MFC in the same time - when i run my app. In BOOL CrTestTaskApp::InitInstance() - init function of my app i wrote this:
CrStartDlg sDlg;
sDlg.DoModal();
CrMainDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
But second dialog apears only after i closed first. And also, if i make Modal() second dialog on BtnClick() first dialog - i cant switch between them.. Active only one...
Help me pls.