MFC界面色調

畫面有漸進的色調

void CTestDlg::OnPaint()
{
 CPaintDC dc(this);
 Graphics graphics( dc.m_hDC );
 CRect rc;
 GetClientRect(&rc);
 LinearGradientBrush linGrBrush(
  Point(rc.left, rc.top),
  Point(rc.right, rc.bottom),
  Color(255, 255, 0, 0),
  Color(255, 0, 0, 255));

 graphics.FillRectangle(&linGrBrush, rc.left, rc.top, rc.Width(), rc.Height());
}

 

LinearGradientBrush

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章