OnPlotMouseMove

3D Graph

Function Group
OnPlotMouseMove() Functions    Prev page: OnPlotMouseDownNext page: OnPlotMouseUp    
Function Declared in:
NiGraph3DEvents.h

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

void OnPlotMouseMove(
    short FAR* Button,
    short FAR* Shift,
    VARIANT FAR* XData,
    VARIANT FAR* YData,
    VARIANT FAR* ZData,
    short FAR* PlotIndex,
    long FAR* PointI,
    long FAR* PointJ);

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

Generated when you move the mouse over a plot.

Note: This event is generated only if the CNiGraph.TrackMode property is set to TrackAllEvents.

Shortcut to top of page. Parameters

short FAR* Button

Contains the state of the mouse buttons, which can be any combination of the CNiGraph3D::MouseButton enumeration values. The following list includes valid enumeration values.

  • CNiGraph3D::LeftButton - the user pressed the left mouse button.
  • CNiGraph3D::RightButton - the user pressed the right mouse button.
  • CNiGraph3D::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 CNiGraph3D::ShiftKeys enumeration values. The following list includes valid enumeration values.

  • CNiGraph3D::ShiftKey - the user pressed the SHIFT key.
  • CNiGraph3D::CtrlKey - the user pressed the CTRL key.
  • CNiGraph3D::AltKey - the user pressed the ALT key.
VARIANT FAR* XData

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.

VARIANT FAR* ZData

The z 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* PointI

The i index of the point (zero-based).

long FAR* PointJ

The j index of the point (zero-based).

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

Shortcut to top of page. Example

void OnPlotMouseMove(short FAR* Button, short FAR* Shift,
    VARIANT FAR* XData, VARIANT FAR* YData, VARIANT FAR* ZData,
    short FAR* PlotIndex, long FAR* PointI, long FAR* PointJ) {
   if ((CNiVariant(XData) > 20 && CNiVariant(YData) < 100) && (*Shift == CNiGraph3D::ShiftKey | CNiGraph3D::AltKey))
       // Your event code here.
}