|
CClientDC pDCShow(this);
CBitmap bitmap;
bitmap.Attach(SHLoadImageFile(strImageFilePath));
BITMAP bmpInfo;
bitmap.GetBitmap(&bmpInfo);
CDC bitmapDC;
bitmapDC.CreateCompatibleDC(&pDCShow);
CBitmap* pOldBitmap = bitmapDC.SelectObject(&bitmap);
int originalX=0,originalY=0;
pDCShow.StretchBlt(originalX, originalY,200, 200, &bitmapDC, 0, 0,bmpInfo.bmWidth, bmpInfo.bmHeight, SRCCOPY);
bitmapDC.SelectObject(pOldBitmap);
bitmap.DeleteObject(); |
|