![]() |



Function |
Declared in: NiGraphEvents.h |
Declaration
void OnCursorMouseMove( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos, short FAR* CursorIndex, long FAR* CursorPart);
Description
Generated when you move the mouse over a cursor.
Note: These events generate only if CNiGraph.TrackMode is TrackAllEvents. If TrackMode is TrackDragCursor, the function generates the CursorChange event.
Parameters
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.
Variant containing the x position of the cursor.
Note: Use CNiVariant to get to the underlying data.
Variant containing the y position of the cursor.
Note: Use CNiVariant to get to the underlying data.
The one-based index of the cursor.
Part of the cursor on which the event occurred. Use the CursorParts enumeration with this value. The following list includes valid values.
- CNiGraph::CursorCrosshair - sets cursor near the intersection point.
- CNiGraph::CursorXLine - sets cursor near the x (vertical) line.
- CNiGraph::CursorYLine - sets cursor near the y (horizontal) line.
See Also
Example
void OnCursorMouseMove(short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos, short FAR* CursorIndex, long FAR* CursorPart) { if ((CNiVariant(XPos) > 20 && CNiVariant(YPos) < 100) && (*Shift == CNiGraph::ShiftKey | CNiGraph::AltKey)) // Your event code here. }