Pergunta

I was reading about the IWebBrowser2-interface and the BeforeNavigate-Event and the OnBeforeNavigate Handler. I was wondering about the following description:

This member function is called by the framework to cause an event to fire before a navigation occurs in the web browser.

The quote can be found here: http://msdn.microsoft.com/de-de/library/2chzz53b.aspx

My understanding was the follwing: an event gets fired and causes a method to be executed, but in the upper description it is completely the other way round.

Can anybody please clarify the situation for me?

Foi útil?

Solução

The wording is awkward because the CHtmlView is simply a thin wrapper around a COM object. It works like this:

  1. Internet Explorer COM object fires a event on the DWebBrowserEvents2 interface
  2. ATL's event sink responds to this call by calling any registered handler methods for the CHtmlView::BeforeNavigate event.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top