validateRect 你想更新的区域.

解决方案 »

  1.   

    好像是InvalideRect函数, 移动的时候只需将有效区域刷新就可以了...
    有效区域可以是包含两个矩形的更大的矩形.
      

  2.   

    I agree with zdg.I think u try to avoid redraw is from 2 reason.first redraw is slow.second the slow speed lead to some flick.Logically,unless you use double buffer(such like ddraw),the redraw(or to say flick)is unavoidable.The only way is try to limit the sregion size which need to be redraw as small as possible.So only invalidate the card's orginal position and its destination position,2 rectangles,use the InvalidateRect. 
      

  3.   

    2 or more retangles use the InvalidateReg not InvalidateRect
      

  4.   

    你在OnDraw中先画左边的矩形, 再画右边矩形. 移动的时候刷新这个有效区域不就行了...
      

  5.   

    为每张牌建立一个窗口(只要一个从CWindow 继承下来的Class, 通过 Class中 CardType, CardNumber 成员判断如何画出该牌,可以用SetWindowRegion 来产生不规则窗口), 只要 MoveWindow 可以了。你看,这样的方法是否巧妙?