AfxDrawGrayBitmap

绘制位图的灰色版本。

void AFXAPI AfxDrawGrayBitmap( 
   CDC *pDC, 
   int x, 
   int y, 
   const CBitmap &rSrc, 
   COLORREF crBackground 
);

参数

  • pDC
    对目标 DC 的点。

  • x
    X 坐标终点。

  • y
    y坐标终点。

  • rSrc
    源位图。

  • crBackground
    新的背景色。(通常为灰色,如 COLOR_MENU)。

备注

位图画出具有 AfxDrawGrayBitmap 将禁用控件的外观。

灰色图标版本与原始图标版本之比较

示例

void CDCView::DrawGrayBitmap(CDC* pDC)
{
   CBitmap bm;
   bm.LoadBitmap(IDB_BITMAP1);
   AfxDrawGrayBitmap(pDC, 10, 50, bm, GetSysColor(COLOR_MENU));
}

要求

标头: afxwin.h

请参见

参考

AfxGetGrayBitmap

AfxDrawDitheredBitmap

概念

MFC 宏和全局函数

其他资源

灰色和抖色位图函数