|
发表于 2020-8-11 23:30:01
|
显示全部楼层
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);
} |
|