![]() |



Function |
Declared in: NiGraphEvents.h |
Declaration
void OnAnnotationMouseDown( short FAR* Button, short FAR* Shift, short FAR* AnnotationIndex, long FAR* AnnotationPart);
Description
Generated when you click the mouse on an annotation.
Note: This event is generated only if the graph's TrackMode property is set to CNiGraph::TrackAllEvents.
Parameters
short FAR* Button
short FAR* Shift
short FAR* AnnotationIndex
long FAR* AnnotationPart
Contains the state of the mouse buttons, which can be any combination of the CNiGraph::MouseButton enumeration values. The following list includes valid enumeration values.
- CNiGraph::LeftButton - the user pressed the left mouse button.
- CNiGraph::RightButton - the user pressed the right mouse button.
- CNiGraph::MiddleButton - the user pressed the middle mouse button.
Contains the state of the SHIFT, CTRL, and ALT keys, which can be any combination of the CNiGraph::ShiftKeys enumeration values. The following list includes valid enumeration values.
- CNiGraph::ShiftKey - the user pressed the SHIFT key.
- CNiGraph::CtrlKey - the user pressed the CTRL key.
- CNiGraph::AltKey - the user pressed the ALT key.
The one-based index of the annotation.
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
Example
void OnAnnotationMouseDown(short FAR* Button, short FAR* Shift, short FAR* AnnotationIndex, long FAR* AnnotationPart) { if ((*AnnotationPart == CNiGraph::AnnotationText) && (*Shift == CNiGraph::ShiftKey | CNiGraph::AltKey)) { // Your event code here. } }