Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
TRY
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

AfxGetGrayBitmap 

Copies a gray version of a bitmap.


void AFXAPI AfxGetGrayBitmap(
   const CBitmap &rSrc,
   CBitmap *pDest,
   COLORREF crBackground
);

Parameters

rSrc

The source bitmap.

pDest

The destination bitmap.

crBackground

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

A bitmap copied with AfxGetGrayBitmap will have the appearance of a disabled control.

Original Vs Gray Interface

CBitmap bm;
bm.LoadBitmap(IDB_BITMAP1);
CBitmap bmGray;
AfxGetGrayBitmap(bm, &bmGray, GetSysColor(COLOR_MENU));

Community Additions

ADD
Show:
© 2015 Microsoft