如何在mfc中 设置视图(新建的文档窗口)背景色

来源:百度知道 编辑:UC知道 时间:2024/06/30 14:23:16

在View中重载WM_CTLCOLOR
添加:
LOGBRUSH logbrush;
COLORREF bkcolor(RGB(117,119,117));
logbrush.lbHatch = 0;
logbrush.lbStyle = BS_SOLID;
logbrush.lbColor =bkcolor;
logbrush.lbColor =bkcolor;
HBRUSH m_hBrush=(HBRUSH)::CreateBrushIndirect(&logbrush);//使用这个