|
void Print_Bitmap(TCanvas *lpCanvas, TRect rectDest, Graphics::TBitmap *lpBitmap)
{
DIBSECTION DibSec;
GetObject(lpBitmap->Handle, sizeof(DibSec),&DibSec);
StretchDIBits(lpCanvas->Handle,
rectDest.Left, rectDest.Top,
(rectDest.Right-rectDest.Left), (rectDest.Bottom-rectDest.Top),
0, 0,
lpBitmap->Width, lpBitmap->Height,
DibSec.dsBm.bmBits,
(BITMAPINFO*)&DibSec.dsBmih,
DIB_RGB_COLORS,
SRCCOPY);
} |
|