图表控件--MSChart(3)不闪烁刷新

 

    Flicker free MSChart

    By ShabuKC | 5 Oct 2003 | Unedited contribution

    A simple way to stop Flickering in MSChart.

    图表控件--MSChart(3)不闪烁刷新_第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.

    Collapse

    <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) ;
     

    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

    About the Author

    ShabuKC

     

    Web Developer

     

    India

     

    Member

     

     

    源文档 <http://www.codeproject.com/KB/miscctrl/NonFlickeringMSChart.aspx>

     

你可能感兴趣的:(图表控件--MSChart(3)不闪烁刷新)