How do I find out if a window is active, and how do i get the hdc