«_Superman_»'s answer gives you the basic principle. Erasing the background (painting it all white) then drawing on top of it is the easy, common, simple approach to handling the display. However, it is susceptible to flicker. On the same principle, drawing a solid rectangle on the display and then a different color, overlapping rectangle is also a source of flicker.
Now, how do you implement «_Superman_»'s advice and extend it to include dealing with drawing overlapping stuff? One approach to deal with this is called double buffering. If you search, you will find material about this both on CodeProject and the rest of the web. I would suggest this article
Doing this is more important than my other response's suggestion of using ScrollWindow(). Once you do this, ScrollWindow() use is more a potential optimization than flicker reduction.
If your window contains child window controls, you might also want to look at the WS_CLIPCHILDREN windows style.