The Old New Thing

What does the CS_OWNDC class style do?

Recall that window DCs are most commonly used only temporarily. If you need to draw into a window, you call or, if outside of a paint cycle, , although painting outside of a paint cycle is generally to be avoided. The window manager produces a DC for the window and returns it. You use the DC, then restore it to its original state and return ...