【转载请注明出处: http://blog.csdn.net/lzl124631x】
接口
BOOL BitBlt(
_In_ HDC hdcDest,_In_ int nXDest,
_In_ int nYDest,
_In_ int nWidth,
_In_ int nHeight,
_In_ HDC hdcSrc,
_In_ int nXSrc,
_In_ int nYSrc,
_In_ DWORD dwRop
);
坐标、大小参数的含义
图片大小550×342
当nWidth和nHeight大于原图片大小时,图片正常输出。BitBlt(hdc,0,0,1000,1000,buf_hdc,0,0,SRCCOPY);
当某一维小于图片尺寸的时候,图片被剪裁
BitBlt(hdc,0,0,1000,180,buf_hdc,0,0,SRCCOPY);
nXSrc和nYSrc决定了从源HDC的哪个点开始截取图
BitBlt(hdc,0,0,550,342,buf_hdc,100,100,SRCCOPY