OnAnnotationChange

CNi

Function Group
OnAnnotationChange() Functions    Prev page: Graph EventsNext page: OnAnnotationMouseDown    
Function Declared in:
NiGraphEvents.h

'Declaration' icon -- Shortcut to top of page. Declaration

void OnAnnotationChange(
    long FAR* AnnotationIndex,
    long FAR* AnnotationPart BOOL FAR* bTracking);

'Description' icon -- Shortcut to top of page. Description

Generated when you reposition an annotation with the mouse.

Note: This event is generated only if the graph's TrackMode property is set to CNiGraph::TrackDragAnnotation.

Shortcut to top of page. Parameters

long FAR* AnnotationIndex

Contains the one-based index of the annotation generating the event.

long FAR* AnnotationPart BOOL FAR* bTracking

Part of the annotation on which the event occurred. Use the AnnotationParts enumeration with this value. The list below includes valid values.

  • CNiGraph::AnnotationText - the mouse is on the annotation text.
  • CNiGraph::AnnotationShape - the mouse is on the annotation shape.
  • CNiGraph::AnnotationShapePoint - the mouse is on an annotation shape point.
  • CNiGraph::AnnotationAll - the mouse is on the annotation.

'See Also' icon -- Shortcut to top of page. See Also

Shortcut to top of page. Example

void OnAnnotationChange(long FAR* AnnotationIndex, long FAR* AnnotationPart, BOOL FAR* bTracking) {
    // Read and set the x and y annotation text positions.
    m_xPos = m_graph.Annotations.Item(AnnotationIndex).TextXPoint;
    m_yPos = m_graph.Annotations.Item(AnnotationIndex).TextXPoint;
}