In my MFC dialogue based application one situation is that first I open modeldialogue and click event of one of button of this dialogue ,it open main dialogue which contains Initinstance and OnInitDialog method in it, so when I clicked on back button of maindialogue ; one time it shows first dialog but second time it closes application! How to solve this problem?
Initialization of first dialog in InitInstance() and call DoModal() in OnInitdialog() of main dialogue. I used syntax for open maindialogue is
OnOk() method so it disappeared first dialogue and main dialogue open,but
when I am going to use DoModal() it gives runtime exception for open maindialog.
Thanks in advance!!