用image.hdc的DrawEllipse 或者直接用gdi api DrawEllipse函数,参见msdn example VOID Example_DrawEllipse4(HDC hdc) { Graphics graphics(hdc); // Create a Pen object. Pen bluePen(Color(255, 0, 0, 255)); // Initialize the variables that define the ellipse. REAL x = 0.0f; REAL y =0.0f; REAL width = 200.0f; REAL height = 100.0f; // Draw the ellipse. graphics.DrawEllipse(&bluePen, x, y, width, height); }
或者直接用gdi api DrawEllipse函数,参见msdn example
VOID Example_DrawEllipse4(HDC hdc)
{
Graphics graphics(hdc); // Create a Pen object.
Pen bluePen(Color(255, 0, 0, 255)); // Initialize the variables that define the ellipse.
REAL x = 0.0f;
REAL y =0.0f;
REAL width = 200.0f;
REAL height = 100.0f; // Draw the ellipse.
graphics.DrawEllipse(&bluePen, x, y, width, height);
}