CImage::BitBlt

Copies a bitmap from the current CImage object device context to the specified device context.

BOOL BitBlt( 
   HDC hDestDC, 
   int xDest, 
   int yDest, 
   DWORD dwROP = SRCCOPY  
) const throw(); 
BOOL BitBlt( 
   HDC hDestDC, 
   const POINT& pointDest, 
   DWORD dwROP = SRCCOPY  
) const throw(); 
BOOL BitBlt( 
   HDC hDestDC, 
   int xDest, 
   int yDest, 
   int nDestWidth, 
   int nDestHeight, 
   int xSrc, 
   int ySrc, 
   DWORD dwROP = SRCCOPY  
) const throw(); 
BOOL BitBlt( 
   HDC hDestDC, 
   const RECT& rectDest, 
   const POINT& pointSrc, 
   DWORD dwROP = SRCCOPY  
) const throw();

Parameters

  • hDestDC
    The destination HDC.

  • xDest
    The logical x-coordinate of the upper-left corner of the destination rectangle.

  • yDest
    The logical y-coordinate of the upper-left corner of the destination rectangle.

  • dwROP
    The raster operation to be performed. Raster-operation codes define exactly how to combine the bits of the source, the destination, and the pattern (as defined by the currently selected brush) to form the destination. See BitBlt in the Windows SDK for a list of other raster-operation codes and their descriptions.

  • pointDest
    A POINT structure indicating the upper-left corner of the destination rectangle.

  • nDestWidth
    The width, in logical units, of the destination rectangle.

  • nDestHeight
    The height, in logical units, of the destination rectangle.

  • xSrc
    The logical x-coordinate of the upper-left corner of the source rectangle.

  • ySrc
    The logical y-coordinate of the upper-left corner of the source rectangle.

  • rectDest
    A RECT structure indicating the destination rectangle.

  • pointSrc
    A POINT structure indicating the upper-left corner of the source rectangle.

Return Value

Nonzero if successful; otherwise zero.

Remarks

You can only specify the upper-left corner of the source rectangle. The lower-right corner of the source rectangle always corresponds to the lower-right corner of the bitmap.

The transferred bitmap is clipped if it is too large for the destination rectangle.

For more information, see BitBlt in the Windows SDK.

Requirements

Header: atlimage.h

See Also

Reference

CImage Class

CImage::PlgBlt

CImage::StretchBlt

CImage::MaskBlt

Other Resources

CImage Members

Change History

Date

History

Reason

May 2009

Added rectangle information to Remarks.

Information enhancement.