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. Web Development
  3. IHTMLDocument2

IHTMLDocument2

Scheduled Pinned Locked Moved Web Development
htmltutorialquestion
5 Posts 3 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.
  • R Offline
    R Offline
    Roy Benson
    wrote on last edited by
    #1

    Hello again, Does anybody know how to create a new IHTMLDocument2 object and then add/insert elements to it? To date, the only way i've found to initialise a IHTMLDocument2 object, has been to load up a (blank) html page and associate it with the new object. Surely, there must be a programmatical way of creating new HTML docs a fresh, without having to load a pre-existing blank web page (i.e to use as a template) everytime? Thanks in advance. Roy

    N R 2 Replies Last reply
    0
    • R Roy Benson

      Hello again, Does anybody know how to create a new IHTMLDocument2 object and then add/insert elements to it? To date, the only way i've found to initialise a IHTMLDocument2 object, has been to load up a (blank) html page and associate it with the new object. Surely, there must be a programmatical way of creating new HTML docs a fresh, without having to load a pre-existing blank web page (i.e to use as a template) everytime? Thanks in advance. Roy

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Is this what you mean.

      R 1 Reply Last reply
      0
      • N Not Active

        Is this what you mean.

        R Offline
        R Offline
        Roy Benson
        wrote on last edited by
        #3

        Hi Mark, Sorry, was there supposed to be a URL or code fragment attached to your reply? Roy

        N 1 Reply Last reply
        0
        • R Roy Benson

          Hello again, Does anybody know how to create a new IHTMLDocument2 object and then add/insert elements to it? To date, the only way i've found to initialise a IHTMLDocument2 object, has been to load up a (blank) html page and associate it with the new object. Surely, there must be a programmatical way of creating new HTML docs a fresh, without having to load a pre-existing blank web page (i.e to use as a template) everytime? Thanks in advance. Roy

          R Offline
          R Offline
          Ryan Park
          wrote on last edited by
          #4

          Hi, I've got little words for your question but don't have any real code fragments that I've used.(I did some similar job what you said in your posting.) 1. Call CreateStreamOHGlobal. (Anyway, you have to allocate some memory or object to physical memory.) 2. Init New stream object with some Text or anything else.(Not Mandatory) 3. Load stream object to your MSHTML instance. If any of you know better COM-style way to implement this, plz comment. Regards, Ryan -p.s If you're not familiar with COM, I guess your current method is sufficient.:)

          1 Reply Last reply
          0
          • R Roy Benson

            Hi Mark, Sorry, was there supposed to be a URL or code fragment attached to your reply? Roy

            N Offline
            N Offline
            Not Active
            wrote on last edited by
            #5

            The word "this" was hyperlinked to http://www.codeproject.com/soap/xml\_html.asp

            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