BOOL CreateCompatibleDC( CDC* pDC );
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.
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.
TRUE if successful; otherwise FALSE.
CDC::CDC, CDC::GetDeviceCaps, ::CreateCompatibleDC