天天看点

什么时候调用CDC::DeleteDC ?

CPrintDialog dlg( FALSE );
 if  (dlg . DoModal()  ==  IDOK)
{
    //  Get a handle to the printer device context (DC). 
    HDC hdc  =  dlg . GetPrinterDC();
    ASSERT (hdc);

    //  Do something with the HDC

   // Clean up. 
    CDC :: FromHandle(hdc) -> DeleteDC();
}

      

继续阅读