1、重载类的WM_CTLCOLOR消息会出现OnCtlColor (CDC* pDC, CWnd* pWnd, UINT nCtlColor)函数
2、修改函数代码为如下代码
HBRUSH hbr = CreateSolidBrush(RGB(255,255,255));
if ( nCtlColor ==CTLCOLOR_DLG)
{
pDC->SetBkMode(TRANSPARENT);
//此处设置字体的颜色
pDC->SetTextColor(RGB(255,255,255));
return hbr;
}else
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
其中 255,255,255表示白色
若是想要组框内外颜色不一样