I'm guessing you're new to windows programming, so I suggest you create an SDI project from the MFC app wizard. And look at the CDC class members. I've attached an MSDN article to get you started.

thanks

dan