Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDC::DeleteDC
◄CDC►                                         ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  BOOL DeleteDC();
 
  Remarks
 
  In general, do not call this function; the destructor will do it for
  you. The DeleteDC member function deletes the Windows device context
  that is attached to the current CDC object. If this CDC object is the
  last active device context for a given device, the device is notified
  and all storage and system resources used by the device are released.
 
  An application must not delete a device context whose handle was
  obtained by calling ◄CWnd::GetDC►. Instead, it must call
  ◄CWnd::ReleaseDC► to free the device context. The ◄CClientDC► class is
  provided to wrap this functionality.
 
  The DeleteDC function is generally used to delete device contexts
  created with ◄CreateDC►, ◄CreateIC►, or ◄CreateCompatibleDC►.
 
  Return Value
 
  Specifies whether the device context has been deleted. TRUE if the
  device context is successfully deleted (regardless of whether the
  deleted device context is the last context for the device). FALSE if an
  error occurs.
 
  See Also
 
  ◄CDC::CDC►, ◄CDC::~CDC►, ◄::DeleteDC►
 
 
                                     -♦-