* Written by C�dric Moonen (firstname.lastname@example.org)
* This code may be used for any non-commercial and commercial purposes in a compiled form.
* The code may be redistributed as long as it remains unmodified and providing that the
* author name and this disclaimer remain intact. The sources can be modified WITH the author
* consent only.
* This code is provided without any garanties. I cannot be held responsible for the damage or
* the loss of time it causes. Use it at your own risks
* An e-mail to notify me that you are using this code is appreciated also.
: CChartCursor(pParent), m_pHorizontalAxis(pHorizAxis), m_pVerticalAxis(pVertAxis),
void CChartCrossHairCursor::Draw(CDC* pDC)
CPen* pOldPen = pDC->SelectObject(&NewPen);
CRect plottingRect = m_pParentCtrl->GetPlottingRect();
void CChartCrossHairCursor::OnMouseMove(CPoint mousePoint)
m_lXPos = mousePoint.x;
m_lYPos = mousePoint.y;
double XVal = m_pHorizontalAxis->ScreenToValue(m_lXPos);
double YVal = m_pVerticalAxis->ScreenToValue(m_lYPos);
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Microsoft bets on Windows XP disaster