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. "Realtime" Displaying of HTML in CWebBrowser2

"Realtime" Displaying of HTML in CWebBrowser2

Scheduled Pinned Locked Moved C / C++ / MFC
htmlhelpquestion
3 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.
  • J Offline
    J Offline
    Jeremy Davis
    wrote on last edited by
    #1

    I generate HTML reports that can be over 100,000 lines long. I then view them in a CWebBrowser2 control. Sometimes to generate these 100,000 line reports take 20 minutes on a fast PC, so what I would like to do is to display the report as it is being generated. No or tag will be seen until the end, and this does not seem to matter. I have tried just calling "reload" every ten second, but as the report gets bigger this does tend to slow down display a lot when reloading. Does anyone know a way I could whatch the report being generated character by character without having to press reload please? In other words everytime my HTML report changes I would like to see the change displayed in my CWebBrowser2 control, however I don't want to reload the entire HTML report each time such a change is detected.... Thanks for any help at all. Jerry

    B 1 Reply Last reply
    0
    • J Jeremy Davis

      I generate HTML reports that can be over 100,000 lines long. I then view them in a CWebBrowser2 control. Sometimes to generate these 100,000 line reports take 20 minutes on a fast PC, so what I would like to do is to display the report as it is being generated. No or tag will be seen until the end, and this does not seem to matter. I have tried just calling "reload" every ten second, but as the report gets bigger this does tend to slow down display a lot when reloading. Does anyone know a way I could whatch the report being generated character by character without having to press reload please? In other words everytime my HTML report changes I would like to see the change displayed in my CWebBrowser2 control, however I don't want to reload the entire HTML report each time such a change is detected.... Thanks for any help at all. Jerry

      B Offline
      B Offline
      Buck
      wrote on last edited by
      #2

      Hi Jerry Heres a different approach :-) First Navigate to about:blank then 1. Use "mshtml" to insert some dummy tags, 2. Now as your app exports the HTML take it as a string and use { insertAdjacentHTML (,"BeforeEnd") } to put your HTML into the control now automate the scroll mechananism probably { scrollto }to scroll to the bottom of the new HTML Continue this until you get to the end. Regardz

      J 1 Reply Last reply
      0
      • B Buck

        Hi Jerry Heres a different approach :-) First Navigate to about:blank then 1. Use "mshtml" to insert some dummy tags, 2. Now as your app exports the HTML take it as a string and use { insertAdjacentHTML (,"BeforeEnd") } to put your HTML into the control now automate the scroll mechananism probably { scrollto }to scroll to the bottom of the new HTML Continue this until you get to the end. Regardz

        J Offline
        J Offline
        Jeremy Davis
        wrote on last edited by
        #3

        Thanks I'll try just that....

        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