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::CreateCompatibleDC
CDC                                         Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  BOOL CreateCompatibleDC( CDC* pDC );
 
  Parameter   Description
 
  <pDC>       A pointer to a device context. If <pDC> is NULL, the
              function creates a memory device context that is compatible
              with the system display.
 
  Remarks
 
  Creates a memory device context that is compatible with the device
  specified by <pDC>. A memory device context is a block of memory that
  represents a display surface. It can be used to prepare images in memory
  before copying them to the actual device surface of the compatible
  device.
 
  When a memory device context is created, GDI automatically selects a
  1-by-1 monochrome stock bitmap for it.
 
  This function can only be used to create compatible device contexts for
  devices that support raster operations. For more information, see the
  RC_BITBLT raster capability in the member function GetDeviceCaps. GDI
  output functions can be used with a memory device context only if a
  bitmap has been created and selected into that context.
 
  Return Value
 
  TRUE if successful; otherwise FALSE.
 
  See Also
 
  CDC::CDC, CDC::GetDeviceCaps, ::CreateCompatibleDC
 
 
                                     -♦-