AfxDrawGrayBitmap

绘制位图的灰色版本。

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

参数

  • pDC
    指向目标 dc:date。

  • 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));
}

要求

Header: afxwin.h

请参见

参考

AfxGetGrayBitmap

AfxDrawDitheredBitmap

概念

MFC宏和Globals

其他资源

灰色和抖动的位图功能