Getting HTML of a document loaded in CHTMLView
-
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
-
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
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;
-
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;
CComPtr m_pBody; But... isn't CComPtr a templated class? What would I use as the template type? Adam cabadam@houston.rr.com