TChart in ATL Control - How to trap mouse events?

TeeChart for ActiveX, COM and ASP
Post Reply
Mathieu
Newbie
Newbie
Posts: 8
Joined: Mon Jan 26, 2004 5:00 am
Contact:

TChart in ATL Control - How to trap mouse events?

Post by Mathieu » Thu May 20, 2004 2:23 pm

Hi,
I am currently using an instance of ITChart in an ATL control.
Everything works fine, excepts that mouse events won't get through
TChart and I am not able to trap them in my control.
How can I do that.

I first try to advise ITChart by deriving my ATL control from :
IDispEventImpl<1, ARTCurveViewer, &__uuidof(TeeChart::ITChartEvents), &__uuidof(TeeChart::__TeeChart), 1, 0>

Then I created a sink map:
BEGIN_SINK_MAP(ARTCurveViewer)
SINK_ENTRY_EX(1, __uuidof(TeeChart::ITChartEvents), 19, OnTChartMouseDown)
END_SINK_MAP()

And finally, I used DispEventAdvise(...) with the IUnknown interface
of my ITChart instance to advise it. However, DispEventAdvise always
returns error code -2147220990 (0x80040203), which I could not find
the definition.

Am I doing it the right way. If so, what is going wrong? It not, how is
the right way?

Thank you very much.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri May 21, 2004 7:56 am

Hi,

please see the answer to the same problem (which also includes and example) on our newsgroups :
public.teechart5.activex on Tue, 9 Mar 2004.

If you cannot find it let me know and I'll post the example in the steema.public.attachments newsgroup.

Mathieu
Newbie
Newbie
Posts: 8
Joined: Mon Jan 26, 2004 5:00 am
Contact:

Post by Mathieu » Fri May 21, 2004 3:43 pm

Thank you,
but I had already found that answer in the newsgroup and I am unable to open the attachement, I only see the file data as text.
Is there another way to get it?
Thank you!

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sun May 23, 2004 5:10 pm

Hi MAtheu,
Is there another way to get it?
I've post it in the steema.public.attachments newsgroup. If you still having problems let me know any mail account to which I can send it.

Mathieu
Newbie
Newbie
Posts: 8
Joined: Mon Jan 26, 2004 5:00 am
Contact:

Post by Mathieu » Tue May 25, 2004 1:51 pm

Thank you, but I just can't seem to open it.
Could you send it to the fallowing email please:
mathieu.coursolle.1@ens.etsmtl.ca

Thank you very much.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue May 25, 2004 3:21 pm

Hi Matheu,

ok, done !

Mathieu
Newbie
Newbie
Posts: 8
Joined: Mon Jan 26, 2004 5:00 am
Contact:

Post by Mathieu » Thu May 27, 2004 7:02 pm

Thanks,
it works fine now.

Post Reply