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!

Answers


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.


Need Your Help

div onclick isn't working

php html wordpress wordpress-plugin

I'm trying to get the caption part of my slider to link to the respective article url on my wordpress site. I'm pretty sure I found the section in the plugin code I think needs to be edited, but wh...

What is the "+<>c__DisplayClassX" type suffix where X is a number?

.net wpf exception serialization

I have an exception thrown by a WPF application. The message is: