How to event sink to events in the same IDispatch derived class 
Author Message
 How to event sink to events in the same IDispatch derived class

    i'm using a Web Browser Control. I have created a IDispatch derived
class in order to catch the double-clicks on the html control.

Setting "put_ondblclick()" using the proper interface to an element of the
document works fine. But now i would like to add another event sink on a
different element, that would be onclick() this time "put-onclick()". I have
already did it with 2 different IDispatch derived classes, but i would like
to use only one derived classe, there is no need for another one.

So how can i assigne a DISPID to the event in order to recognize it when
Invoke is called ? I tried to check if dispIdMember was equal to
DISPID_ITHMLDOCUMENT2_ONCLICK or something like this that is specified in
the doc but all i got is a "unfined identifier" at compilation. Maybe i need
to include a library or something ?

Maybe i really need to derive IDispatch twice to make the difference between
the two events ? But i don't think so... i just don't know how to do it



Sylvain Simard
Dveloppement multimdia
QA International


Tue, 29 Jul 2003 04:18:26 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ATL DLL event sink with a VB ActiveX DLL event source

2. ATL COM Component firing events into VBScript event sink

3. Fire an Event, sink a event - Help!

4. Event Sink for a COM object which raises events - Proof of Concept

5. Event sinking is sinking me!!! :)

6. Problem with ATL Sink class for catching another ATL's events

7. CStatic derived class not detecting LMouseDown events

8. Catch events fired from an MFC ActiveXCtrl in CView derived class

9. CRichEditCtrl-derived class won't get ANY events from control

10. Sourcing Events from a CCmdTarget-derived class ?

11. Events and IDispatch problems.

12. Connection Point to Event Interface in CHtmlView IE Control via IDispatch


Powered by phpBB® Forum Software