Reputation: 19559
Why does windows separate the painting cycle into two message wm_paint and wm_ereasebackground, why not just one?
Upvotes: 0
Views: 97
Reputation: 2044
This is still from the good old ways where WM_PAINT could have been too slow. It was better to have at least the background drawn. It is far less important today.
You can use the default implementation which just draws the background with the window's default background brush. Alternatively, you can just ignore it and use WM_PAINT for all your drawing code.
I think there was an article by Raymond Chen, but I can't find it now.
http://blogs.msdn.com/b/oldnewthing/
Upvotes: 2