GetDC 与 释放DC
{
CDC *pDC = pParent->GetDC();
………………
pParent->ReleaseDC(pDC);
}
Unless the device context belongs to a window class, the ReleaseDC member function must be called to release the context after painting. Since only five common device contexts are available at any given time, failure to release a device context can prevent other applications from accessing a device context