Re: How to catch DISPID_CLICK event ?
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Wed, 31 Aug 2005 13:34:44 -0400
Seb <kipcool.sb@xxxxxxxxx> wrote:
> My new piece of code:
>
> class ATL_NO_VTABLE CMyClass :
> ...
> public IDispEventImpl<1, CMyClass, &DIID_DWebBrowserEvents2,
> &LIBID_SHDocVw, 1, 1>,
> public IDispatchImpl<IMyClass, &IID_MyClass, &LIBID_MYCLASSLib>
>
> BEGIN_SINK_MAP(CMyClass)
> SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_CLICK, OnClick)
WebBrowser still does not have any "click" event.
> SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE,
> DocumentComplete)
> END_SINK_MAP()
>
> I don't advise my sinks because I don't know this :(
Your code is almost there, except for that reinterpret_cast. But it's
easier to just call DispEventAdvise you inherited from IDispEventImpl:
DispEventAdvise(pWebBrowser);
pWebBrowser is a pointer to WebBrowser instance (does not matter which
interface). There's also DispEventUnadvise method whose purpose should
be obvious.
> How to write my other advise ?
What other advise?
--
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
.
- Follow-Ups:
- Re: How to catch DISPID_CLICK event ?
- From: Seb
- Re: How to catch DISPID_CLICK event ?
- References:
- Re: How to catch DISPID_CLICK event ?
- From: Seb
- Re: How to catch DISPID_CLICK event ?
- Prev by Date: Re: How to catch DISPID_CLICK event ?
- Next by Date: Embedded Browser (setting html directly)
- Previous by thread: Re: How to catch DISPID_CLICK event ?
- Next by thread: Re: How to catch DISPID_CLICK event ?
- Index(es):
Relevant Pages
|
|