OnPlotMouseUp

CNi

Function Group
OnPlotMouseUp() Functions    Prev page: OnPlotMouseMoveNext page: OnReadyStateChange    
Function Declared in:
NiGraphEvents.h

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

void OnPlotMouseUp(
    short FAR* Button,
    short FAR* Shift,
    VARIANT FAR* XData,
    VARIANT FAR* YData,
    short FAR* PlotIndex,
    long FAR* PointIndex);

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

Generated when you release the mouse over a plot.

Note: These events generate only if CNiGraph.TrackMode is TrackAllEvents.

Shortcut to top of page. Parameters

short FAR* Button

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.
short FAR* Shift

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.
VARIANT FAR* XData

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.

VARIANT FAR* YData

The y value of the point nearest to the mouse pointer when the event occurred.

Note: Use CNiVariant to get to the underlying data.

short FAR* PlotIndex

The one-based index of the plot.

long FAR* PointIndex

The zero-based index of the point.

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

Shortcut to top of page. Example

void OnPlotMouseUp(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.
}