MFC 根据圆心和半径画圆

void CDrawDlg::DrawEllipse(int x,int y,int r)
{
CClientDC dc(this);
CBrush brush,*oldbrush;
brush.CreateSolidBrush(RGB(0xD1,0xFB,0xED));
oldbrush=dc.SelectObject(&brush);
dc.Ellipse(x-r,y-r,x+r,y+r);
dc.SelectObject(oldbrush);
}

你可能感兴趣的:(mfc)