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 and Document

IWebBrowser2 and Document

Scheduled Pinned Locked Moved C / C++ / MFC
databasecomtutorialquestion
4 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.
  • P Offline
    P Offline
    Philip Patrick
    wrote on last edited by
    #1

    Is there any way to separate IWebBrowser2 and its document? IWebBrowser2 has an get_Document() function. I want something like put_Document. So I can "switch" documents of the browser. Like you do in a View (even in SDI). Does anyone know how to do that and if it is possible at all? Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have it!

    M 1 Reply Last reply
    0
    • P Philip Patrick

      Is there any way to separate IWebBrowser2 and its document? IWebBrowser2 has an get_Document() function. I want something like put_Document. So I can "switch" documents of the browser. Like you do in a View (even in SDI). Does anyone know how to do that and if it is possible at all? Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have it!

      M Offline
      M Offline
      Marc Richarme
      wrote on last edited by
      #2

      Why not create temporary html files with the different "documents" and just Navigate to them when needed? Cheers! Marc

      A P 2 Replies Last reply
      0
      • M Marc Richarme

        Why not create temporary html files with the different "documents" and just Navigate to them when needed? Cheers! Marc

        A Offline
        A Offline
        Alex Cramer
        wrote on last edited by
        #3

        Use document.write(...) method.

        1 Reply Last reply
        0
        • M Marc Richarme

          Why not create temporary html files with the different "documents" and just Navigate to them when needed? Cheers! Marc

          P Offline
          P Offline
          Philip Patrick
          wrote on last edited by
          #4

          Well, I even can store all HTML in IStream and load again (will be faster) or use document.write() as ADK says below. But in all 3 ways, the document will be disconnected from the actual site. Links won't be resolved properly. Of course I can change links from relative to full, then all will work correctly, but... Something tells me that this is not the right way :) Well, I don't think I can do what I wanted to do, but I found another solution, workaround :) Since I can't change Document of the browser... I can change the whole window ;P. Just like in with CView. The only disadvantage I see, that I will have additional Browser control (IWebBrowser2) for each window.... But I guess this is the price :) Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have 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