如何更改MFC中单文档背景颜色?

单文档会生产一个View类,在CXXXView类的OnDraw函数里面修改一下就好了
我生成的View类是CTTTView,代码如下:
void CTTTView::OnDraw(CDC* pDC)
{
CTTTDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CRect rect;
GetClientRect(rect);//先得到客户区
pDC->FillSolidRect(rect, RGB(100, 255, 100));//然后填充这个区域,RGB里面就写你要的背景颜色
}

http://blog.csdn.net/akof1314/article/details/4952372

相关文章:

  • 2022-12-23
  • 2021-11-09
  • 2021-06-03
  • 2021-07-01
  • 2021-06-03
  • 2022-02-05
  • 2022-12-23
猜你喜欢
  • 2022-01-19
  • 2022-12-23
  • 2022-01-06
  • 2021-08-05
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案