绘制位图的灰色版本。
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