Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Handling multiple events simultaneously.

Hi,

I have a window with a CNiGraph inside. In the graph I have multple traces. I have a toolbar which has the following buttons:
* Pan
* Zoom Area
* ZoomX
* ZoomY
* Range mark
* Add annotation
When the user clicks a toolbar item I have to change the Tracking mode to the appropriate mode, eg
if (m_nMode == 0)
m_Graph2D.SetTrackMode(CNiGraph::TrackAllEvents);
else if (m_nMode == 1)
m_Graph2D.SetTrackMode(CNiGraph::TrackPanPlotAreaXY);
else if(m_nMode == 2)
m_Graph2D.SetTrackMode(CNiGraph::TrackZoomRectXY );
else if(m_nMode == 3)
m_Graph2D.SetTrackMode(CNiGraph::TrackZoomRectX);
else if(m_nMode == 4)
m_Graph2D.SetTrackMode(CNiGraph::TrackZoomRectY);
else if(m_nMode == 5)
m_Graph2D.SetTrackMode
(CNiGraph::TrackDragCursor);
else if (m_nMode == 6)
m_Graph2D.SetTrackMode(CNiGraph::TrackDragAnnotation)

My problem is the following. If the user has a cursor displayed and wants to zoom I set the trackmode, however if after the zoom he wants to move the cursor I have to change the trackmode. Is there a way to have multiple trackmodes at the same time. Meaning if the user creates a rectangle for zooming it zooms however if the user starts dragging an annotation or a cursor it will respond to that.
Since if I change to TrackAllEvents it will not track my cursor or my annotations, since the events are never fired.

Please help,
Thanks
Miklos
0 Kudos
Message 1 of 2
(3,176 Views)
The Measurement Studio C++ graph does not support enabling multiple interaction modes. As you suggest, the way to do this is to have a toolbar, in which the user can select the interaction mode that he or she wants.

On a side note, the Measurement Studio .NET graph does support enabling multiple interaction modes. However, using the Measurement Studio .NET graph would require that you use a managed language (e.g. C#, VB.NET, Managed C++) for your user interface.
0 Kudos
Message 2 of 2
(3,176 Views)