Jump to content
Software FX Community

Annotation Event


User (Legacy)

Recommended Posts

Thanks for the answer. I am using ChartFX Client Server edition in VC++. I

added an event handler to the chart. The event handler handles all standard

chart events properly. It does not handles any annotation events. Here is my

code.

class CMyChartEvents : public ICfxEvents

{

...

// Annotation. I also added following code to CfxEvents.h.

// I don't know the correct format. I tried both sets. I may be wrong

here.

STDMETHOD(ObjectCreated)(struct IAnnObject * /*pObj*/) { return

S_FALSE; }

STDMETHOD(Fire_ObjectCreated)(struct IAnnObject * /*pObj*/) { return

S_FALSE; }

...

}

In the chart class,

CDAChartEvents *pEv = new CMyChartEvents();

pChart->raw_SetEventHandler((LPUNKNOWN) pEv,NULL);

pEv->Release();

They don't work for annotation. Is there a way to add event handler to the

Annotation extension in VC++, like in C#?

Thanks.

Jun Xia

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:1$ouIpiqDHA.1900@WEBSERVER1...

> You need to attach to the appropriate event. For example:

>

> [C#]

> {

>

> ...

>

> annotationX.ObjectCreated += new

> AnnotationEventHandler(annotation_ObjectCreated);

>

> ...

>

> }

>

> private void annotation_ObjectCreated (object sender, AnnotationEventArgs

e)

>

> {

>

> }

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

We don't have a similar interface for annotation.

The only way to capture events for the annotation extension is through

standard COM events.

We don't have a sample on this, you can check MSDN's docs on "Events in COM

and Connectable Objects" under:

"Platform SDK Documentation/Component Services/COM Fundamentals/Guide/Events

in COM and Connectable Objects"

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...