Actually, you can.
I just thought once again about your problem, and here is what I get. To
access the object model of html page you need the IWebBrowser2 interface.
The esiest (and I believe, most recommended) way to get is to write BHO
extension and track DocumentComplete events. Once you get DocumentComplete
event, you're sure that page is loaded, and you can edit its content just
after complete event. To change the html you should:
(typing from my mind, so here might be some mistakes in method names)
- obtain pointer to document interface (IWebBrowser2::get_Document())
- query IHTMLDocument2 interface from obtained document interface
- form the vector array (which represents the actual html you want to write)
- write the array to html document using IHTMLDocument2::write(..)
However, you can get pointer to IWebBrowser2 not only from BHO. You can
enumerate shell windows using ShellWindows object. This is not safe method,
because there is no syncronization, i.e. at the moment of writing the HTML
code the window can already be closed and you're not able to track this
event.
--
Vladimir, Windows SDK MVP
Post by ShrageI guess it means that you cannot accees the main window using html
Thanks a lot,
Shrage
Post by Scherbina VladimirYou need to write BHO to access object model of page.
--
Vladimir, Windows SDK MVP
Post by ShrageIm trying to make a custom explorer bar which higlights certain areas
in
the
currently displayed window in IE. how do i access the main window frim within
the custom explorer bar? the custom explorer bar is an html page not a COM
object.?