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. Getting HTML of a document loaded in CHTMLView

Getting HTML of a document loaded in CHTMLView

Scheduled Pinned Locked Moved C / C++ / MFC
questionhtmlcom
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.
  • C Offline
    C Offline
    Cabadam
    wrote on last edited by
    #1

    Alright, I have created an SDI app and, using Navigate2() have loaded a page. I have used the OnDocumentComplete() to allow me to know when it is done loading. How can I get the source code for that page? Thanks! Adam cabadam@houston.rr.com

    L 1 Reply Last reply
    0
    • C Cabadam

      Alright, I have created an SDI app and, using Navigate2() have loaded a page. I have used the OnDocumentComplete() to allow me to know when it is done loading. How can I get the source code for that page? Thanks! Adam cabadam@houston.rr.com

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

      CComPtr m_pBody; CComPtr spBrowser; HRESULT hr = QueryControl(__uuidof(spBrowser), reinterpret_cast(&spBrowser)); if( SUCCEEDED(hr) ) { CComPtr pDisp; if( SUCCEEDED(spBrowser->get_Document(&pDisp)) && pDisp ) { HRESULT hr = pDisp.QueryInterface(&m_pDoc); if( SUCCEEDED(hr) && m_pDoc ) { if( SUCCEEDED(m_pDoc->get_body(&m_pBody)) && m_pBody ) return TRUE; } } } return FALSE;

      C 1 Reply Last reply
      0
      • L Lost User

        CComPtr m_pBody; CComPtr spBrowser; HRESULT hr = QueryControl(__uuidof(spBrowser), reinterpret_cast(&spBrowser)); if( SUCCEEDED(hr) ) { CComPtr pDisp; if( SUCCEEDED(spBrowser->get_Document(&pDisp)) && pDisp ) { HRESULT hr = pDisp.QueryInterface(&m_pDoc); if( SUCCEEDED(hr) && m_pDoc ) { if( SUCCEEDED(m_pDoc->get_body(&m_pBody)) && m_pBody ) return TRUE; } } } return FALSE;

        C Offline
        C Offline
        Cabadam
        wrote on last edited by
        #3

        CComPtr m_pBody; But... isn't CComPtr a templated class? What would I use as the template type? Adam cabadam@houston.rr.com

        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