Why cannot BHO receive the DocumentComplete(DISPID_DOCUMENTCOMPLETE) event again when I refresh
I have written a bho object and sinked the events of IE.
when navigate to a new page,bho can receive the documentcomplete event.
but when I refresh the current page, bho cannot receive the event again,while bho can receive other event well. (I am sure then I havenot Unadvised the events)
who could tell me why?
What works for me:
My BHO implements (among many other things) IDispatch and IOleObjectWithSite
In IOleObjectWithSite::SetSite, query for the connection point container, find the connection point for DIID_DWebBrowserEvents2, and advise with your BHO as reinterpret_cast<IDispatch*>
In your BHO, override the implementation of Invoke(). It gets called with DISPID_DOCUMENTCOMPLETE on a refresh.
Hope this helps,
Casper