StretchBlt之前设置模式,效果能好一点 ::SetStretchBltMode(hDc,COLORONCOLOR);第二个参数可以参考msdn,一般缩小就用COLORONCOLORBLACKONWHITE Performs a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels. COLORONCOLOR Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information. HALFTONE Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels. After setting the HALFTONE stretching mode, an application must call the SetBrushOrgEx function to set the brush origin. If it fails to do so, brush misalignment occurs.This option is not supported on Windows 95/98/Me.
STRETCH_ANDSCANS Same as BLACKONWHITE. STRETCH_DELETESCANS Same as COLORONCOLOR. STRETCH_HALFTONE Same as HALFTONE. STRETCH_ORSCANS Same as WHITEONBLACK. WHITEONBLACK Performs a Boolean OR operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.
SetViewportExtEx(hdc, width>>1,height>>1, NULL);
来试试
::SetStretchBltMode(hDc,COLORONCOLOR);第二个参数可以参考msdn,一般缩小就用COLORONCOLORBLACKONWHITE
Performs a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels. COLORONCOLOR
Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information. HALFTONE
Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
After setting the HALFTONE stretching mode, an application must call the SetBrushOrgEx function to set the brush origin. If it fails to do so, brush misalignment occurs.This option is not supported on Windows 95/98/Me.
STRETCH_ANDSCANS
Same as BLACKONWHITE. STRETCH_DELETESCANS
Same as COLORONCOLOR. STRETCH_HALFTONE
Same as HALFTONE. STRETCH_ORSCANS
Same as WHITEONBLACK. WHITEONBLACK
Performs a Boolean OR operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.
SetStretchBltMode(hdc, HALFTONE);
来看看
CSDN小助手是一款脱离浏览器也可以访问Csdn论坛的软件
界面:http://blog.csdn.net/Qqwwee_Com/archive/2005/11/05/523395.aspx
下载:http://szlawbook.com/csdnv2