关于CDC画图时的重绘有关问题

关于CDC画图时的重绘问题
各位帮帮忙
我在对话框里的edit   box里进行一个实时的GPS路径画图(当前点和前一点的连线)
现在有个问题是:
情况一:
我直接在屏幕DC上画时,一旦对话框别盖住后,之前的图就不见了

情况二:
我用MemDC画时,每次只能画出当前要画的线。
原因是我是用定时器调用我的画图函数,每次都是重新生成一个新的DC

怎么实现我在原来的MenDC上画线?
谢谢各位了

------解决方案--------------------
Invalidate后面的参数有一个值为TRUE,一个值为FALSE,为FALSE的时候应该是不擦除原来的背景继续绘图,楼主试一下吧,我也没有用过。
------解决方案--------------------
The bErase parameter specifies whether the background within the update area is to be erased when the update region is processed. If bErase is TRUE, the background is erased when the BeginPaint member function is called; if bErase is FALSE, the background remains unchanged. If bErase is TRUE for any part of the update region, the background in the entire region, not just in the given part, is erased.