Partager via


AfxDrawGrayBitmap

Draws a gray version of a bitmap.

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

Paramètres

  • pDC
    Points to the destination DC.

  • x
    The destination x-coordinate.

  • y
    The destination y-coordinate.

  • rSrc
    The source bitmap.

  • crBackground
    The new background color (typically gray, such as COLOR_MENU).

Notes

A bitmap drawn with AfxDrawGrayBitmap will have the appearance of a disabled control.

Comparaison des versions d'icônes grises et d'origine

Exemple

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

Configuration requise

En-tête : afxwin.h

Voir aussi

Référence

AfxGetGrayBitmap

AfxDrawDitheredBitmap

Concepts

macro MFC et Globals

Autres ressources

Gris et fonctions de bitmap tramées