VC6 C++ can I prevent an "Internet Explorer Script Error" debug dialog popup [modified]
-
I have written an MFC application, with an embedded WebBrowser Control, using Visual Studio 6 C++ It follows an example on MSDN entitled "Using MFC to Host a WebBrowser Control". The application creates an html script and navigates to it using code similar to ... m_browser.Navigate(filenamestring, NULL,NULL,NULL,NULL); for example. If the connection fails, I get the "Internet Explorer Script Error" debug popup. Is it possible to detect / trap this error within my program so the popup is not generated ??
modified on Monday, August 22, 2011 12:50 PM
-
I have written an MFC application, with an embedded WebBrowser Control, using Visual Studio 6 C++ It follows an example on MSDN entitled "Using MFC to Host a WebBrowser Control". The application creates an html script and navigates to it using code similar to ... m_browser.Navigate(filenamestring, NULL,NULL,NULL,NULL); for example. If the connection fails, I get the "Internet Explorer Script Error" debug popup. Is it possible to detect / trap this error within my program so the popup is not generated ??
modified on Monday, August 22, 2011 12:50 PM
Try calling
SetSilent(TRUE)
on the web control maybe.> The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<
-
Try calling
SetSilent(TRUE)
on the web control maybe.> The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<
-
That works great, thanks. However it exposes a new issue, how do I now know if it failed ? I want to show a message if it fails
I have no idea really, sorry. Google is your friend...
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<
-
That works great, thanks. However it exposes a new issue, how do I now know if it failed ? I want to show a message if it fails
implement IDocHostShowUI::ShowMessage see http://msdn.microsoft.com/en-us/library/aa753271(v=VS.85).aspx
-
implement IDocHostShowUI::ShowMessage see http://msdn.microsoft.com/en-us/library/aa753271(v=VS.85).aspx
This article shows how to display a message box (good) but i need to detect the need for it. If the Navigate fails (the cable is out) i get a script error box. SetSilent() prevents the error box but now i just have a blank WebBrowser2. How am i alerted of the error ??
-
This article shows how to display a message box (good) but i need to detect the need for it. If the Navigate fails (the cable is out) i get a script error box. SetSilent() prevents the error box but now i just have a blank WebBrowser2. How am i alerted of the error ??
If your code (for display or simply do nothing) get called, then you are detected for it.