Page 1 of 1

TChart in ATL Control - How to trap mouse events?

Posted: Thu May 20, 2004 2:23 pm
by 9080623
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.

Posted: Fri May 21, 2004 7:56 am
by Pep
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.

Posted: Fri May 21, 2004 3:43 pm
by 9080623
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!

Posted: Sun May 23, 2004 5:10 pm
by Pep
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.

Posted: Tue May 25, 2004 1:51 pm
by 9080623
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.

Posted: Tue May 25, 2004 3:21 pm
by Pep
Hi Matheu,

ok, done !

Posted: Thu May 27, 2004 7:02 pm
by 9080623
Thanks,
it works fine now.