![]() |



Function |
Declared in: NiGraphEvents.h |
Declaration
void OnPlotMouseDown( short FAR* Button, short FAR* Shift, VARIANT FAR* XData, VARIANT FAR* YData, short FAR* PlotIndex, long FAR* PointIndex);
Description
Generated when you click the mouse on a plot.
Note: These events generate only if CNiGraph.TrackMode is TrackAllEvents.
Parameters
short FAR* Button
short FAR* Shift
VARIANT FAR* XData
VARIANT FAR* YData
short FAR* PlotIndex
long FAR* PointIndex
Contains the state of the mouse buttons, which can be any combination of the CNiGraph::MouseButton 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.
- CNiGraph::ShiftKey - the user pressed the SHIFT key.
- CNiGraph::CtrlKey - the user pressed the CTRL key.
- CNiGraph::AltKey - the user pressed the ALT key.
Variant containing the x value of the point nearest to the mouse pointer when the event occurred.
Note: Use CNiVariant to get to the underlying data.
The y value of the point nearest to the mouse pointer when the event occurred.
Note: Use CNiVariant to get to the underlying data.
The one-based index of the plot.
The zero-based index of the point.
See Also
Example
void OnPlotMouseDown(short FAR* Button, short FAR* Shift, VARIANT FAR* XData, VARIANT FAR* YData, short FAR* PlotIndex, long FAR* PointIndex) { if ((CNiVariant(XData) > 20 && CNiVariant(YData) < 100) && (*Shift == CNiGraph::ShiftKey | CNiGraph::AltKey)) // Your event code here. }