AfxDrawDitheredBitmap

绘制位图,其背景替换带有抖动检查器 () 模式。

void AFXAPI AfxDrawDitheredBitmap( 
   CDC *pDC, 
   int x, 
   int y, 
   const CBitmap &rSrc, 
   COLORREF cr1, 
   COLORREF cr2 
);

参数

  • pDC
    对目标 DC 的点。

  • x
    目标 X 坐标。

  • y
    目标 y 坐标。

  • rSrc
    源位图。

  • cr1
    两抖动颜色之一,通常为空。

  • cr2
    其他抖动颜色,通常 COLOR_MENU (浅灰色)。

备注

位图在具有源替换位图的背景色的两个 (cr1 和 cr2) 的模式绘制网格的 DC 目标。 源位图的背景定义,它与像素的颜色像素空白和任何像素在位图的左上角。

抖动图标版本与原始图标版本之比较

示例

void CDCView::DrawDitheredBitmap(CDC* pDC)
{
   CBitmap bm;
   bm.LoadBitmap(IDB_BITMAP1);
   AfxDrawDitheredBitmap(pDC, 10, 50, bm, RGB(255,255,255),
      GetSysColor(COLOR_BTNFACE));
}

要求

标头: afxwin.h

请参见

参考

AfxGetDitheredBitmap

AfxDrawGrayBitmap

概念

MFC 宏和全局函数

其他资源

灰色和抖色位图函数