Events from the WebBrowser control



The MSDN documentation for DWebBrowserEvents2 says that it derives
indirectly from IDispatch and shows members such as BeforeNavigate2 and
NavigateComplete2. However, when I look at the header file (ExDisp.h) I
see that DWebBrowserEvents2 derives directly from IDispatch and does not
add any additional members.

A search of the Include directory finds these name in ExDisp.idl as
members of a "dispinterface" with the name DWebBrowserEvents2 but
apparently they are not transferred into the header file.

I have some sample code that compares at the DISPID_xxx names associated
with the dispinterface functions with the dispIdMember argument that is
passed to DWebBrowserEvents2::Invoke().

Is this the best/only way to handle these events in C++? Or can I create
a class based on what I found in the IDL file and have the event
functions that are documented called directly? If so, how do I tell the WebBrowser control to use my class as an interface?

Norm
--
--
To reply, change domain to an adult feline.

.



Relevant Pages

  • Re: metadata operation failed (8013110E) : Database file is corrupt and may not be usable.
    ... This is an established project that has been compiling for several ... I can only add two more members to my ... tried adding an additional header file with no result. ... >slightly different metadata in two modules for the same type. ...
    (microsoft.public.dotnet.languages.csharp)
  • COM Events and IDispatch - DWebBrowserEvents2 and HTMLWindowEvents2
    ... I have an IE plugin that is hooked into DWebBrowserEvents2 in the ... interface IMyInterface: IDispatch { ... how do I add the HTMLWindowEvents2 in this case? ... have 2 interfaces that exposes IDispatch part, ...
    (microsoft.public.vc.atl)
  • Re: C++ api ?
    ... their members and methods available. ... > input string to int. ... > Well also one has to include the appropriate header file as well!! ...
    (comp.lang.cpp)
  • Re: COM Events and IDispatch - DWebBrowserEvents2 and HTMLWindowEvents2
    ... COM_MAP an interface DWebBrowserEvents that it does not implement ... public DWebBrowserEvents2") ... for IDispatch, which you do implement. ... use IDispEventImpl; your class can derive from IDispEventImpl more than ...
    (microsoft.public.vc.atl)
  • Re: Is CppUnit un-C++
    ... > Derrick Coetzee wrote: ... >> Typically, nothing in a header file contains local variables anyway, ... That is to say class type used as members of the class being ...
    (comp.lang.cpp)

Quantcast