Graph Events

CNi

Function Group Graph Events Functions    Prev page: OnReadyStateChangeNext page: OnAnnotationChange    
Function Group Declared in:
NiGraphEvents.h

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

The Measurement Studio graph control generates a variety of events in response to user input or changes in properties that are bound to a DataSocket source.

Complete the following steps to add an event handler for a particular event generated by the graph control.

1. Edit a dialog resource and add a Measurement Studio graph control to the dialog.

2. Right-click on the graph control and select Events.

3. Select the appropriate event to handle and select Add and Edit. By default, this creates a new member function for which the name has the form shown below.

On[eventName][objectIdSuffix]

To help you find the appropriate online help, the components of the member function name are described below.

  • eventName is the event name.
  • objectIdSuffix is the last part of the ID assigned to the control.

For example, if you have a graph control for which the ID is IDC_CWGRAPH1 and you want to add a handler for the Click event, the default member function name created by the ClassWizard is OnClickCwgraph1.

4. Click OK to add and edit the new event handler. Notice that the prototype of the member function matches the corresponding event listed below. You can select this link to get additional information regarding the event.

Note: Various graph events pass COM VARIANT data types as parameters to the event handler. Measurement Studio includes the CNiVariant class, which provides a convenient interface for managing these VARIANT data types. Refer to the documentation for each event for further information.

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

Global function void

OnAnnotationChange( long FAR* AnnotationIndex, long FAR* AnnotationPart BOOL FAR* bTracking )

Generated when you reposition an annotation with the mouse.
Global function void

OnAnnotationMouseDown( short FAR* Button, short FAR* Shift, short FAR* AnnotationIndex, long FAR* AnnotationPart )

Generated when you click the mouse on an annotation.
Global function void

OnAnnotationMouseMove( short FAR* Button, short FAR* Shift, short FAR* AnnotationIndex, long FAR* AnnotationPart )

Generated when you move the mouse over an annotation.
Global function void

OnAnnotationMouseUp( short FAR* Button, short FAR* Shift, short FAR* AnnotationIndex, long FAR* AnnotationPart )

Generated when you release the mouse over an annotation.
Global function void

OnClick()

Generated when you click the mouse on the control.
Global function void

OnCursorChange( long FAR* CursorIndex, VARIANT FAR* XPos, VARIANT FAR* YPos, BOOL FAR* bTracking )

Generated when you reposition a cursor with the mouse.
Global function void

OnCursorMouseDown( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos, short FAR* CursorIndex, long FAR* CursorPart )

Generated when you click the mouse on a cursor.
Global function void

OnCursorMouseMove( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos, short FAR* CursorIndex, long FAR* CursorPart )

Generated when you move the mouse over a cursor.
Global function void

OnCursorMouseUp( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos, short FAR* CursorIndex, long FAR* CursorPart )

Generated when you release the mouse over a cursor.
Global function void

OnCWBindingDataUpdated( short Index, LPDISPATCH Data, BOOL FAR* Ignore )

Generated when the binding data is updated.
Global function void

OnCWBindingStatusUpdated( short Index, long Status, long Error, LPCTSTR Message )

Generated when the status of the binding connection changes.
Global function void

OnDblClick()

Generated when you double-click the mouse on the control.
Global function void

OnKeyDown( short FAR* KeyCode, short Shift )

Generated when you press a key while the control has the input focus.
Global function void

OnKeyPress( short FAR* KeyAscii )

Generated when a KeyDown message generates a key while a control is active.
Global function void

OnKeyUp( short FAR* KeyCode, short Shift )

Generated when you release a key while the control has the input focus.
Global function void

OnMouseDown( short Button, short Shift, long x, long y )

Generated when you click the mouse on the control.
Global function void

OnMouseMove( short Button, short Shift, long x, long y )

Generated when you move the mouse over the control.
Global function void

OnMouseUp( short Button, short Shift, long x, long y )

Generated when you release the mouse on the control.
Global function void

OnPlotAreaMouseDown( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos )

Generated when you click the mouse on the plot area.
Global function void

OnPlotAreaMouseMove( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos )

Generated when you move the mouse over the plot area.
Global function void

OnPlotAreaMouseUp( short FAR* Button, short FAR* Shift, VARIANT FAR* XPos, VARIANT FAR* YPos )

Generated when you release the mouse over the plot area.
Global function void

OnPlotMouseDown( short FAR* Button, short FAR* Shift, VARIANT FAR* XData, VARIANT FAR* YData, short FAR* PlotIndex, long FAR* PointIndex )

Generated when you click the mouse on a plot.
Global function void

OnPlotMouseMove( short FAR* Button, short FAR* Shift, VARIANT FAR* XData, VARIANT FAR* YData, short FAR* PlotIndex, long FAR* PointIndex )

Generated when you move the mouse over a plot.
Global function void

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

Generated when you release the mouse over a plot.
Global function void

OnReadyStateChange()

Generated when the ready state changes.