Re: HTMLTextContainerEvents2 without DocumentComplete?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Igor...however, I'm hooking up my connection points to the body
element, obtained using htmlDocument->get_body(). It seems like the
body element isn't available until I get a document complete callback.

Is there another way I can try?

Igor Tandetnik wrote:
key88sf@xxxxxxxxx wrote:
Hi - I have a strange problem. My program normally waits for the
DocumentComplete event of IWebBrowser2, and then hooks up various
connection points to the IHTMLDocumentElement. This all works fine.

The problem is, when the user hits the "Stop" button while a page is
loading, I never get my DocumentComplete event, and thus my event
handlers are never hooked up. This causes problems in my program. Is
there any way to detect (and maybe still hook events to the html
document) when the user stops a page from loading before it's
complete?

Document object is available as early as NavigateComplete2 event. You
can hook your events there.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925

.



Relevant Pages