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

 

  • Flicker free MSChart

    By ShabuKC | 5 Oct 2003 | Unedited contribution

    A simple way to stop Flickering in MSChart.

    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>

     

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值