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

原文地址:https://www.cnblogs.com/carl2380/p/1924671.html