Compaq Visual Fortran: A Guide to Creating Windows Applications

Images can be copied from one location to another using BitBlt. The BitBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context. The source image to be transferred can exist in memory. Alternatively, it could be a part of the screen or even the complete screen, and the destination to which the image is to be copied can be a compatible device, such as clipboard, screen, or memory. If the color formats of the source and destination device contexts do not match, the BitBlt function converts the source color format to match the destination format. The syntax of the BitBlt function is as follows:
bret = BitBlt(hdcDest,xDest,yDest,cWidth,cHeight, & hdcSrc,xSrc,ySrc,dwRop)
The argument hdcDest is a handle to the destination device context. The point (xDest, yDest) specifies the top left-hand corner of a destination rectangle that is cWidth units wide and cHeight units high. BitBlt performs raster drawing operations on this rectangular area. The argument hdcSrc is a handle to the source device context. The point (xSrc, ySrc) specifies the coordinate position of the upper left-hand corner of the source image. The last argument, dwROP, is one of 16 possible raster-operation codes used to define how the color data for the source rectangle are to be combined with the color data for...