
Changing the Background Color of a Dialog to match the background of a Bitmap
m_DialogColor = m_dlg.GetColor();
m_nDlgClr = 3452816845;
int r = GetRValue(m_nDlgClr);
int g = GetGValue(m_nDlgClr);
int b = GetBValue(m_nDlgClr);
r = 195;
g = 195;
b = 195;
m_BitmapColor = RGB(r,g,b);
m_nBmpClr = 12829635;
// SetCurrentColor(m_nBmpClr);
// SetBackgroundColor( BOOL bSysColor, COLORREF cr );
I used GetColor() to determine the color of the dialog. The background
of the bitmap doesn't match the background of the dialog. Using the
RGB macro, I found the the color of the bitmap background. I tried
using SetCurrentColor(m_nBmpClr) and SetBackgroundColor( BOOL bSysColor,
COLORREF cr ),
but neither worked. What is the call to set the dialog to the shade of the
bitmap?
Thanks,
Brett Shifflett