Applications: Painting problems with windowed directdraw app

Well, the painting problem that I mentioned in my last post is solved. Thanks to Joel for helping me out (:

 

When I look in retrospect, the answer was in the question all the time. Painting problem, WM_PAINT message. It was stupid of me to have missed that (; But looking at the bright side I have a much better understanding of how WM_PAINT works now. The only thing that I needed to do was to display the frame every time my window got a WM_PAINT message. So that our client area is re-drawn and is displayed correctly. Just call DisplayFrame() inside WM_PAINT. That is all.

 

Here’s a video of how things are working now, pretty smooth (:

 

Leave a Reply

Your email address will not be published. Required fields are marked *