Page 1 of 1

Obtaining the x and y coordinates of a cursor

Posted: Fri Dec 05, 2008 9:57 am
by 15050891
Dear sir/madam

I am currently using Visual Studio 2008 the C++ component under windows XP.

How do I obtain the x and y coordinates of a cursor on a graph?

Regards
Jacques Bekker

Posted: Fri Dec 05, 2008 10:31 am
by narcis
Hi Jacques,

You can do this:

Code: Select all

	double xval = m_Chart1.GetTools().GetItems(0).GetAsTeeCursor().GetXVal();
	double yval = m_Chart1.GetTools().GetItems(0).GetAsTeeCursor().GetYVal();