Click here to Skip to main content
15,912,400 members

Comments by Bob Namenottaken (Top 9 by date)

Bob Namenottaken 11-Jul-11 8:38am View    
Thank you. I understand that - I just don't like the idea of wasting the time with the copy. But I'm ok if "that's the way it is". I was just wondering if experienced programmers had a tcehnique to avoid the copy.
Bob Namenottaken 9-Jul-11 12:40pm View    
What I meant was you draw everything onto your in-memory screen-sized array and then call the Invalidate function when done. When WM_PAINT comes along you paint the whole thing in one shot.

I understand you could get more complicated and detect regions that have changed and start invalidating based on regions, etc. I suppose you could even use a timer to invalidate, set a flag to stop drawing, update the screen and then clear the flag... and myriad other ways, too... I really appreciate your insight. My son and I are going to play around with this over weekend.
Bob Namenottaken 9-Jul-11 8:05am View    
This now makes me wonder why so many programmers discuss the use of double buffering. It seems to me this technique of 1) create in-memory, 2) invalidate, 3) WM_PAINT is inherently double-buffering. Why so many articles advising double buffering and how to do it?
Bob Namenottaken 8-Jul-11 20:09pm View    
The code works, thanks again.
Bob Namenottaken 8-Jul-11 19:24pm View    
Thank you so much!