Ellipse() 函数可以用来绘制椭圆,它的原型为:

BOOL Ellipse、(http://www.amjmh.com/v/)

HDC hdc, //设备环境句柄
int nLeftRect, //左上角x坐标
int nTopRect, //左上角y坐标
int nRightRect, //右下角x坐标
int nBottomRect //右下角y坐标
);
1
2
3
4
5
6
7
注意:当 nRightRect - nLeftRect = nBottomRect - nRightRect 时绘制出的是一个圆。

示例代码:

case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
Ellipse(hdc, 20, 20, 180,90);
EndPaint(hwnd, &ps);
return 0 ;
--------------------- 

相关文章:

  • 2021-05-05
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2023-03-15
猜你喜欢
  • 2021-11-10
  • 2021-11-15
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案