OnCursorChange

3D Graph

Function Group
OnCursorChange() Functions    Prev page: OnClickNext page: OnDblClick    
Function Declared in:
NiGraph3DEvents.h

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

void OnCursorChange(
    long FAR* CursorIndex,
    double FAR* XPosition,
    double FAR* YPosition,
    double FAR* ZPosition,
    BOOL FAR* Tracking);

'Description' icon -- Shortcut to top of page. 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::TrackZoomPanRotate or CNiGraph::TrackDragCursor.

Shortcut to top of page. Parameters

long FAR* CursorIndex

Contains the one-based index of the cursor generating the event.

double FAR* XPosition

Contains the x position of the cursor.

double FAR* YPosition

Contains the y position of the cursor.

double FAR* ZPosition

Contains the z position of the cursor.

BOOL FAR* Tracking

Contains true if the mouse button was down when the event occurred.

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

Shortcut to top of page. Example

void OnCursorChange(long FAR* CursorIndex, double FAR* XPos, double FAR* YPos, double FAR* ZPos, BOOL FAR* Tracking) {
    // Read and set the x, y and z cursor positions.
    m_xPos = *XPos;
    m_yPos = *YPos;
    m_zPos = *ZPos;
}