如何在mfc中 设置视图(新建的文档窗口)背景色
1个回答
展开全部
在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);//使用这个
添加:
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);//使用这个
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询