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. IWebBrowser2::Navigate2 problem with IE8 on Win7

IWebBrowser2::Navigate2 problem with IE8 on Win7

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 2 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.
  • N Offline
    N Offline
    narasingubhanu
    wrote on last edited by
    #1

    Creating webbrowser as below

    hret=CoCreateInstance(clsid,NULL,CLSCTX_ALL,IID_IUnknown
    ,reinterpret_cast<void**>(&m_pUnknown));

    hret=m_pUnknown->QueryInterface(IID_IWebBrowser2,(PVOID *)&m_pBrowser);
    ASSERT(SUCCEEDED(hret));

    but when i say HRESULT hret = m_pBrowser->Navigate2(varURL,&noArg,&noArg,&noArg,&noArg); its opening new IE window on WIn7. But in Xp sys its not happening like that. I dont want to open new IE window Any one has any idea why it is opening on new IE window on Win7

    L 1 Reply Last reply
    0
    • N narasingubhanu

      Creating webbrowser as below

      hret=CoCreateInstance(clsid,NULL,CLSCTX_ALL,IID_IUnknown
      ,reinterpret_cast<void**>(&m_pUnknown));

      hret=m_pUnknown->QueryInterface(IID_IWebBrowser2,(PVOID *)&m_pBrowser);
      ASSERT(SUCCEEDED(hret));

      but when i say HRESULT hret = m_pBrowser->Navigate2(varURL,&noArg,&noArg,&noArg,&noArg); its opening new IE window on WIn7. But in Xp sys its not happening like that. I dont want to open new IE window Any one has any idea why it is opening on new IE window on Win7

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It's quite possible (and not unknown) for later versions to contain stricter interpretation of optional parameters. The documentation[^] shows how to set the required behaviour.

      Use the best guess

      N 1 Reply Last reply
      0
      • L Lost User

        It's quite possible (and not unknown) for later versions to contain stricter interpretation of optional parameters. The documentation[^] shows how to set the required behaviour.

        Use the best guess

        N Offline
        N Offline
        narasingubhanu
        wrote on last edited by
        #3

        I tried a lot on this but couldn't able to resolve this Can any one help?

        L 1 Reply Last reply
        0
        • N narasingubhanu

          I tried a lot on this but couldn't able to resolve this Can any one help?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          narasingubhanu wrote:

          I tried a lot on this but couldn't able to resolve this

          Tried what, and what results did you get? Please don't expect people to be able to guess what you have done.

          Use the best guess

          N 1 Reply Last reply
          0
          • L Lost User

            narasingubhanu wrote:

            I tried a lot on this but couldn't able to resolve this

            Tried what, and what results did you get? Please don't expect people to be able to guess what you have done.

            Use the best guess

            N Offline
            N Offline
            narasingubhanu
            wrote on last edited by
            #5

            HRESULT hret = m_pBrowser->Navigate2(varURL,&varFlag,&vFrame,&noArg,&noArg); I passed browser constants and frame also but still its opening in new window and if i call any browser function after that its crashing ex:m_pBrowser->get_Busy(&bBusyFlag); //crash application

            L 1 Reply Last reply
            0
            • N narasingubhanu

              HRESULT hret = m_pBrowser->Navigate2(varURL,&varFlag,&vFrame,&noArg,&noArg); I passed browser constants and frame also but still its opening in new window and if i call any browser function after that its crashing ex:m_pBrowser->get_Busy(&bBusyFlag); //crash application

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              You need to use your debugger to find out why it's crashing.

              Use the best guess

              N 1 Reply Last reply
              0
              • L Lost User

                You need to use your debugger to find out why it's crashing.

                Use the best guess

                N Offline
                N Offline
                narasingubhanu
                wrote on last edited by
                #7

                Thanks for suggession. if you want compelte problem here it is I am printing htnl doc from url. In xp with out opening new IE browser we will get file save dialog while printing the doc File save dialog opens at m_pBrowser->ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER,&noArg,&noArg); at this point if you press Alt+tab you can see IE icon. but in Win 7 directly opening IE window at Navigate2 function

                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