Click here to Skip to main content
15,885,868 members
Articles / Desktop Programming / MFC
Article

Flicker free MSChart

Rate me:
Please Sign up or sign in to vote.
1.16/5 (21 votes)
4 Oct 2003 51.9K   16  
A simple way to stop Flickering in MSChart.

Setting the DrawMode to 1

Introduction

This solves the problem of Flickering while the Chart values are updated rapidly.

Using the code

The trick is to set the mschart property DrawMode to 1 as shown in the picture. We need to do one more thing, set the Redraw to false just before updating the chat values and set ReDraw to true and also GetUpdated region and Invalidate the updated region.

<CODE>
m_ChartControl.SetRedraw(false) ; 
//.........code to update the Chart goes here
//.........................
CRgn rgn; 
m_ChartControl.GetUpdateRgn(&rgn); 
m_ChartControl.SetRedraw(true); 
m_ChartControl.InvalidateRgn(&rgn,false) ;
</CODE> 

Points of Interest

Hope this helps for all those you looking for non-flickering charts.

History

None as of now!!

Thanks!!

Happy codeing!!!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --