Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Not every output device supports the entire set of graphics functions. For example, because of hardware limitations, most vector plotters do not support bit-block transfers. An application can determine whether a device supports a particular graphics function by calling the GetDeviceCaps function, specifying the appropriate index, and examining the return value.
The following example shows how an application tests a printer to determine whether it supports bit-block transfers.
// Examine the raster capabilities of the device
// identified by hdcPrint to verify that it supports
// the BitBlt function.
if ((GetDeviceCaps(hdcPrint, RASTERCAPS)
& RC_BITBLT) == 0)
{
DeleteDC(hdcPrint);
break;
}
else
{
// Print the bitmap using the printer DC.
}