hdc is used to associate a presentation space with the window.

Note: The window device context is automatically closed when its associated window is destroyed. It must not be closed with the DevCloseDC call.