//画圆角矩形,填充圆角矩形
BOOL CCurveCurrentDlg::OnEraseBkgnd(CDC *pDC)
{
       CRect  rect;
        this->GetClientRect(&rect);
        CRgn     roundRect;                       //圆角矩形区
        CBrush   selBsh;
        selBsh.CreateSolidBrush(RGB(144, 150, 152));
        POINT ptRound;
        ptRound.x = 7;
        ptRound.y = 7;
        pDC->RoundRect(rect, ptRound);             //用当前画笔画圆角边框
        roundRect.CreateRoundRectRgn(rect.left + 1, rect.top, rect.right, rect.bottom, ptRound.x, ptRound.y);  //填充圆角矩形范围
        pDC->FillRgn(&roundRect, &selBsh);
        selBsh.DeleteObject();
}

相关文章:

  • 2021-07-07
  • 2021-07-11
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
猜你喜欢
  • 2021-04-24
  • 2021-08-26
  • 2021-09-22
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案