![]() |

| Function |
Declared in: NiGraphEvents.h |
Declaration
void OnCursorChange(
long FAR* CursorIndex,
VARIANT FAR* XPos,
VARIANT FAR* YPos,
BOOL FAR* bTracking);
Description
Generated when you reposition a cursor with the mouse.
Note: This event is generated only if the graph's TrackMode property is set to CNiGraph::TrackDragCursor.
Parameters
long FAR* CursorIndex
VARIANT FAR* XPos
VARIANT FAR* YPos
BOOL FAR* bTracking
Contains the one-based index of the cursor generating the event.
Contains the x position of the cursor.
Note: Use CNiVariant to get to the underlying data.
Contains the y position of the cursor.
Note: Use CNiVariant to get to the underlying data.
Contains true if the user clicked the mouse when the event occurred.
See Also
Example
void OnCursorChange(long FAR* CursorIndex, VARIANT FAR* XPos, VARIANT FAR* YPos, BOOL FAR* bTracking) {
// Read and set the X and Y cursor positions.
m_xPos = CNiVariant(*XPos);
m_yPos = CNiVariant(*YPos);
}

