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. Showing memory contents into a HTMLView?

Showing memory contents into a HTMLView?

Scheduled Pinned Locked Moved C / C++ / MFC
htmlperformancequestion
9 Posts 5 Posters 2 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
    Joan M
    wrote on last edited by
    #1

    Hello... I'm using the Paul DiLascia's HTMLCtrl in my dialog based app. As I use this control in order to show variable information to the user I would like not to save the HTML generated into a file in order to send the path to the browser control... Is this possible? I would like to avoid the saving to the disc step. thank you in advance.

    https://www.robotecnik.com freelance robots, PLC and CNC programmer.

    C D 2 Replies Last reply
    0
    • J Joan M

      Hello... I'm using the Paul DiLascia's HTMLCtrl in my dialog based app. As I use this control in order to show variable information to the user I would like not to save the HTML generated into a file in order to send the path to the browser control... Is this possible? I would like to avoid the saving to the disc step. thank you in advance.

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      i fought with this problem for days. i finally came to the conclusion that it is not possible - many people on Google have come to the same conclusion. so, i create a temp file for the HTML and read it from there. -c


      There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'. --Holgate, from Plastic

      Smaller Animals Software

      J 1 Reply Last reply
      0
      • C Chris Losinger

        i fought with this problem for days. i finally came to the conclusion that it is not possible - many people on Google have come to the same conclusion. so, i create a temp file for the HTML and read it from there. -c


        There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'. --Holgate, from Plastic

        Smaller Animals Software

        J Offline
        J Offline
        J Patel
        wrote on last edited by
        #3

        There is a not so nice way of doing so and I am sure there are limitations. Passing any text after the 'about:' protocol(?) in IE is diplayed in the browser. You can even put in links, font styles etc and IE will parse the text. as a quick example you can type the following text in the start/run dialog. about:Code Project I'm pretty sure you'll be limited (eventually) by the size of the URL. HTH Jignesh

        R J 2 Replies Last reply
        0
        • J J Patel

          There is a not so nice way of doing so and I am sure there are limitations. Passing any text after the 'about:' protocol(?) in IE is diplayed in the browser. You can even put in links, font styles etc and IE will parse the text. as a quick example you can type the following text in the start/run dialog. about:Code Project I'm pretty sure you'll be limited (eventually) by the size of the URL. HTH Jignesh

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Brilliant! Simply brilliant! You just saved me from writing (and deleting) an ugly temp .htm file. :rose: /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

          J 1 Reply Last reply
          0
          • R Ravi Bhavnani

            Brilliant! Simply brilliant! You just saved me from writing (and deleting) an ugly temp .htm file. :rose: /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

            J Offline
            J Offline
            J Patel
            wrote on last edited by
            #5

            Thanks. But you should be aware of the max URL length that can be passed. I haven't tried this myself but if you look in wininet.h you see the following #defines #define INTERNET_MAX_PATH_LENGTH 2048 #define INTERNET_MAX_SCHEME_LENGTH 32 // longest protocol name length #define INTERNET_MAX_URL_LENGTH (INTERNET_MAX_SCHEME_LENGTH \ + sizeof("://") \ + INTERNET_MAX_PATH_LENGTH) I guess as long as your html text doesn't go over the #define you'll be ok. Jignesh

            R 1 Reply Last reply
            0
            • J J Patel

              Thanks. But you should be aware of the max URL length that can be passed. I haven't tried this myself but if you look in wininet.h you see the following #defines #define INTERNET_MAX_PATH_LENGTH 2048 #define INTERNET_MAX_SCHEME_LENGTH 32 // longest protocol name length #define INTERNET_MAX_URL_LENGTH (INTERNET_MAX_SCHEME_LENGTH \ + sizeof("://") \ + INTERNET_MAX_PATH_LENGTH) I guess as long as your html text doesn't go over the #define you'll be ok. Jignesh

              R Offline
              R Offline
              Ravi Bhavnani
              wrote on last edited by
              #6

              Good point. I guess it also pays to urlencode the text before checking its length. Thanks for making TakeStock[^] less ugly. :) /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

              1 Reply Last reply
              0
              • J Joan M

                Hello... I'm using the Paul DiLascia's HTMLCtrl in my dialog based app. As I use this control in order to show variable information to the user I would like not to save the HTML generated into a file in order to send the path to the browser control... Is this possible? I would like to avoid the saving to the disc step. thank you in advance.

                D Offline
                D Offline
                David Salter
                wrote on last edited by
                #7

                Does this help? http://codeguru.earthweb.com/ieprogram/HtmlMemory.html[^] Dave.

                1 Reply Last reply
                0
                • J J Patel

                  There is a not so nice way of doing so and I am sure there are limitations. Passing any text after the 'about:' protocol(?) in IE is diplayed in the browser. You can even put in links, font styles etc and IE will parse the text. as a quick example you can type the following text in the start/run dialog. about:Code Project I'm pretty sure you'll be limited (eventually) by the size of the URL. HTH Jignesh

                  J Offline
                  J Offline
                  Joan M
                  wrote on last edited by
                  #8

                  Hello, This can be a great solution, but I don't know how to launch the code to my HTMLCtrl... I'm using Paul DiLascia's HTMLCtrl (is directly derived from HTMLView), but I need to show the HTML "file" in that control not in a normal IE window. How do I launch that? Do I need to use a system("about:MyHTMLCode") call? If I do it in this way I won't be able to redirect MyHTMLCode to my HTMLCtrl because this would fire another instance of IE. Is there any better way to launch it? I've tried to pass this to the navigate instruction, but it hasn't worked for me: CString a = ""; a.Format("about:%s",csCodiHTML); this->m_HTMLCtrl.Navigate(a); could you explain how to do it? Thank you in advance!

                  https://www.robotecnik.com freelance robots, PLC and CNC programmer.

                  J 1 Reply Last reply
                  0
                  • J Joan M

                    Hello, This can be a great solution, but I don't know how to launch the code to my HTMLCtrl... I'm using Paul DiLascia's HTMLCtrl (is directly derived from HTMLView), but I need to show the HTML "file" in that control not in a normal IE window. How do I launch that? Do I need to use a system("about:MyHTMLCode") call? If I do it in this way I won't be able to redirect MyHTMLCode to my HTMLCtrl because this would fire another instance of IE. Is there any better way to launch it? I've tried to pass this to the navigate instruction, but it hasn't worked for me: CString a = ""; a.Format("about:%s",csCodiHTML); this->m_HTMLCtrl.Navigate(a); could you explain how to do it? Thank you in advance!

                    J Offline
                    J Offline
                    J Patel
                    wrote on last edited by
                    #9

                    I tried the above with some simple HTML on a CHTMLView and not the HTMLCtrl (which should work the same though) and it worked. I can think of two things. 1) I used the Navigate2 method. 2) Is the URL VERY long? See the above threads on limitations. or you can try what someone else suggested (the atricle on codeguru). HTH Jignesh

                    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