User (Legacy) Posted July 16, 2004 Report Share Posted July 16, 2004 Hi, I have a specific set of data which, when plotted to Chart Looks fine. However, only this set of data causes a crash when I use the PaintInfo method to get the chart DC and then do some line drawing on the chart. This code has worked for over 2 years, and now this one set of code is causing the crash. The basics of the code look like: ' Select our clipping region, so when we draw we only ' draw inside the chart, and not on the border hRegion = GetChartHRegion() ChartDC = m_Chart.PaintInfo(CPI_GETDC) result = SelectClipRgn(ChartDC, hRegion) ' Draw the first crosshair m_Chart.ValueToPixel XData(P1), YData(P1), px, py, AXIS_Y MoveTo ChartDC, px - 7, py Regardless of what points I select from the data, the result is always the same. Basically there is an access violation somewhere after the system enters the call to MoveTo... Any ideas as to how to work around this or troubleshoot? Thanks, Abe Krebs Link to comment Share on other sites More sharing options...
Software FX Posted July 16, 2004 Report Share Posted July 16, 2004 Did you watch the values of hRegion, px and py ? Where is this code being called from ? A Paint event ? Which one ? -- 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.