I want to draw in the View window of a MFC application. This can be done with LineTo, MoveTo, etc. Now when I want to draw a rect, that moves when my mouse moves, the old rects are still there. I can update de view window with pDoc->UpdateAllViews() but this causes my application to crasch sometimes and the View window flickers with this 'animation'.
Is there another appraoch how you can avoid this problem?