My IE crashes on EndDialog and DoModal on another new dialog
I am opening a CDialog(CAxDialogImpl) using m_nRet = DoModal();
On this dialog I have an options button. When I click on this options button, I need to close this existing dialog and open another dialog (my options dialog). In order to close the existing dialog, I first call EndDialog(m_nRet) and then call DoModal() again to open my options dialog.
I am able to successfully close and reopen another dialog. However, when I try to close this new options dialog, my IE page in the background refreshes with a message:
A problem with this webpage caused Internet Explorer to close and reopen the tab.
I am new to this technology and would appreciate your help. Thank you!
When the options button is clicked, you will need to either set up a member variable (e.g.: m_bInvokeOptionsDlg) or a unique return value and exit the dialog.
The calling function should then check this value and invoke the options dialog box. Once the call returns, you could loop back and open the initial dialog again.
Another alternative would be to invoke the options dialog box directly when the options button is clicked, but then both the dialog boxes would be visible.