闪烁的问题可以用memDC解决,快速的擦点/画点用bitblt将需要保留的曲线部分平移可以解决。

解决方案 »

  1.   

    谢谢你的建议,正是我想要的。请问有相关的例程么?
    My Email: [email protected] 非常感谢你的关注!!!
     
      

  2.   

    (to) likevclinux(流浪的小狗) 
      可以发给我一份么?谢谢!!!
      

  3.   

    add WM_ERASEBKGND message, return directly from it(do not call base implementation)
    draw in memory dc first, eg:
    RECT rect = ....;
    HDC dc = ...;
    HDC dcmem = ::CreateCompatibleDC(dc);
    int width = rect.right-rect.left;
    int height = rect.bottom-rect.top;
    HBITMAP hbmpdraw = ::CreateCompatibleBitmap(dcmem,width,height);
    HBITMAP hbmpold = (HBITMAP)::SelectObject(dcmem,hbmpdraw);
    SelectObject( dcmem, GetStockObject(BLACK_BRUSH) );
    Rectangle(dcmem, 0,0,width, height);
    //more drawing here
    BitBlt(dc,0,0,width,height,dcmem,0,0,SRCCOPY);
    SelectObject(dcmem,hbmpold);
    DeleteObject(hbmpdraw);
    DeleteObject(dcmem);
      

  4.   

    Use a timer to update view, do not update view everytime data changes to avoid unnecessary update.
      

  5.   

    SetROP2(dc,R2_XORPEN) can help you earse previous drawing.
      

  6.   

    thank you very much!! I will try it.
      

  7.   

    哦!忘了写我得Email地址了: [email protected] 
    楼上有例程的朋友,可以发一份给我参考么?谢谢!!!
      

  8.   

    我也需要实例:[email protected] 谢谢!
      

  9.   

    其实在显示实时曲线时,可以先用ScrollDC()来滚动旧曲线,再绘制新的,不过要不闪烁,这些都应该先在MemDC中进行,然后再在显示在屏幕上.
      

  10.   

    http://www.codeguru.com/bitmap/Graph.html
    Real Time 2D Graph - B.Manivannan (2001/11/05)
    [Updated] Graphically displaying real-time data
      

  11.   

    如何使用MemDC,有例程么?谢谢!
      

  12.   

    谁可以写个小例程?谢谢!!!
    [email protected]
      

  13.   

    我也要,谢谢
    [email protected]