User (Legacy) Posted May 15, 2004 Report Share Posted May 15, 2004 Hello All! I've got the following problem. I want to know which point was selected by user. The ChartFX documentation contains the event "LButtonUp( short x, short y, short* shRes )". I use following code to convert this coordinate to the number of series and number of point in series: CComVariant v; com_err = m_spChart->PaintInfo( ChartfxLib::CPI_PIXELTOMARKER, CComVariant(MAKELONG(x, y)), &v); com_err = v.ChangeType(VT_I4); const WORD wSeries = LOWORD(v.lVal); const WORD wPoint = HIWORD(v.lVal); But number of point for series can be more then WORD - 2 byte (). Everywhere else (in ChartFX documentation) the number of point can be long - 4 byte. If I try use this event it will arouse an error when user click on the point with number (for example) 70000 in sieries. Have you got any work around to resolve the issue? Thanks, Kirill Link to comment Share on other sites More sharing options...
Software FX Posted May 17, 2004 Report Share Posted May 17, 2004 Yes. Use the HitTest method instead as follows: Dim nSeries As Integer Dim nPoints As Long Dim hitType As Integer hitType = ChartFX1.HitTest(x, y, nSeries, nPoints) -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.