void DrawEllipse(CDC* pDC) { // create a CDC Ellipse object CEllipse ellipse(50, 50, 150, 100); // set the background color of the ellipse ellipse.SetBkColor(RGB(255, 255, 255)); // white // set the border color of the ellipse ellipse.SetLineColor(RGB(0, 0, 255)); // blue // draw the ellipse on the device context ellipse.Draw(pDC); }
void ResizeEllipse(CDC* pDC) { // create a CDC Ellipse object CEllipse ellipse(50, 50, 150, 100); // set the position of the ellipse ellipse.SetPosition(100, 100); // set the size of the ellipse ellipse.SetSize(200, 150); // draw the ellipse on the device context ellipse.Draw(pDC); }Package library: Microsoft Foundation Class (MFC) library.