Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VC6 C++ can I prevent an "Internet Explorer Script Error" debug dialog popup [modified]

VC6 C++ can I prevent an "Internet Explorer Script Error" debug dialog popup [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharphtmlvisual-studiohardware
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cgb143
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • C cgb143

      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

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      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.<

      C 1 Reply Last reply
      0
      • C Code o mat

        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.<

        C Offline
        C Offline
        cgb143
        wrote on last edited by
        #3

        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

        C X 2 Replies Last reply
        0
        • C cgb143

          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

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          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.<

          1 Reply Last reply
          0
          • C cgb143

            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

            X Offline
            X Offline
            xrg_soft 163 com
            wrote on last edited by
            #5

            implement IDocHostShowUI::ShowMessage see http://msdn.microsoft.com/en-us/library/aa753271(v=VS.85).aspx

            C 1 Reply Last reply
            0
            • X xrg_soft 163 com

              implement IDocHostShowUI::ShowMessage see http://msdn.microsoft.com/en-us/library/aa753271(v=VS.85).aspx

              C Offline
              C Offline
              cgb143
              wrote on last edited by
              #6

              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 ??

              X 1 Reply Last reply
              0
              • C cgb143

                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 ??

                X Offline
                X Offline
                xrg_soft 163 com
                wrote on last edited by
                #7

                If your code (for display or simply do nothing) get called, then you are detected for it.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups