how does one get the HTML that the web browser control has?? 
Author Message
 how does one get the HTML that the web browser control has??

I want to programmatically acquire the HTML contained in a webcontrol in my
program, something like when you right click on IE WebBrowser and click on
"view source" menu item, that brings up notebook with HTML source, how do I
do that?


Thu, 19 Feb 2004 02:37:30 GMT  
 how does one get the HTML that the web browser control has??
how about calling IPersistStream::Save?


Quote:
> I want to programmatically acquire the HTML contained in a webcontrol in
my
> program, something like when you right click on IE WebBrowser and click on
> "view source" menu item, that brings up notebook with HTML source, how do
I
> do that?



Thu, 19 Feb 2004 16:19:22 GMT  
 how does one get the HTML that the web browser control has??
The IWebBrowser2 interface has a method for getting documents from the
browser.
You can find this in the MSDN or at http://msdn.microsoft.com

IWebBrowser2::Document Property
Remarks

  When the active document is an HTML page, this property provides access to
the contents of the HTML Document Object Model (DOM). Specifically, it
returns an IDispatch  interface pointer to the HTMLDocument component object
class (coclass). The HTMLDocument coclass is functionally equivalent to the
Dynamic HTML (DHTML) document object used in HTML script. It supports all
the properties and methods necessary to access the entire contents of the
active HTML document.

  C++ programs can retrieve the Component Object Model (COM) interfaces
IHTMLDocument, IHTMLDocument2, and IHTMLDocument3 by calling QueryInterface
on the IDispatch received from this property.

  When other document types are active, such as a Microsoft? Word document,
this property returns the default IDispatch dispatch interface
(dispinterface) pointer for the hosted document object. For Word documents,
this would be functionally equivalent to the Document object in the Word
object model. For more information on the Microsoft? Office DOM, refer to
the Microsoft Office Developer Centre.

Good luck,
Dave White
http://www.slb.com


Quote:
> I want to programmatically acquire the HTML contained in a webcontrol in
my
> program, something like when you right click on IE WebBrowser and click on
> "view source" menu item, that brings up notebook with HTML source, how do
I
> do that?



Sun, 22 Feb 2004 09:23:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Web Browser Control/Explorer Control/HTML Control

2. Web Browser Control/IE Control/HTML View

3. Print an HTML document from an ActiveX control (Web Browser Control)

4. Print an HTML document from an ActiveX control (Web Browser Control)

5. Getting generated HTML into browser control

6. A composite control calling another composite control in web browser

7. subclass a control from a Web Browser control

8. control Web browser control

9. subclass a control from a Web Browser control.

10. IE/Web Browser Refresh One Frame.

11. Getting rid of the web browser's toolbar

12. 1.Getting HTML Page from a ASP of a web site

 

 
Powered by phpBB® Forum Software