Obtaining the x and y coordinates of a cursor

TeeChart for ActiveX, COM and ASP
Post Reply
jacques
Newbie
Newbie
Posts: 30
Joined: Thu Nov 20, 2008 12:00 am
Location: South Africa
Contact:

Obtaining the x and y coordinates of a cursor

Post by jacques » Fri Dec 05, 2008 9:57 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 05, 2008 10:31 am

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();
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply