User (Legacy) Posted November 13, 2003 Report Share Posted November 13, 2003 We are using the Client Server edition of ChartFX. How can we let Chart Object to handle Annotation events? Link to comment Share on other sites More sharing options...
Software FX Posted November 13, 2003 Report Share Posted November 13, 2003 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 More sharing options...
User (Legacy) Posted November 14, 2003 Author Report Share Posted November 14, 2003 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 More sharing options...
Software FX Posted November 17, 2003 Report Share Posted November 17, 2003 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.