06-30-2005 05:44 PM - edited 06-30-2005 05:44 PM
Message Edited by codekin on 06-30-2005 05:45 PM
07-01-2005 01:03 PM - edited 07-01-2005 01:03 PM
Hi Codekin, There is a great example that ships with Measurement Studio that shows the cursor position as you move along the graph. You can find this example at: C:\Program Files\National Instruments\MeasurementStudio\VC\Examples\Ui\Graph\Cursors Inside CursorsDlg.cpp
there is code that reads the current cursor position
void CCursorsDlg::OnSetpos()
{
//set the cursor positions
m_Graph.GetCursors().Item(1).XPosition = m_SetxPos.Value;
if (m_Graph.GetCursors().Item(1).SnapMode != CNiCursor::SnapNearestPoint)
m_Graph.GetCursors().Item(1).YPosition = m_SetyPos.Value;
//read the acceptable x and y positions that the cursors were moved to
m_xPos.Value = m_Graph.GetCursors().Item(1).XPosition;
m_yPos.Value = m_Graph.GetCursors().Item(1).YPosition;
}
Look over this example and let us know if you are still having any trouble.
Thanks
Caroline
National Instruments
Message Edited by Support on 07-01-2005 02:08 PM