如题:现在我想绘制椭圆,但只有长短轴长度和一个中心点,能绘图吗?
解决方案 »
- 如何在一个对话框中访问另一个对话框的控件
- 怎么样在vc中创建一个excel文件 ,要求可以用的
- 有关VC tab键切换控件的小问题
- dlg 1 调用 dlg2 dlg2 调用 dlg3 当按esc时怎么关闭的是dlg1呀,应该是关dlg2才对呀
- 请问 VC++2005 可以导出Makefile吗?谢谢!
- 求一关于word操作的一问
- 急!有关在动态链接库中使用数据库的问题
- 基于cView的工程怎么像基于对话框的工程那样可以拖放控件
- 我有一个变量,只在程序起动时初始化一次,怎么才能做数组的维数呢。
- 能不能告诉我,windows是用什么语言写的吗
- 求救 WIN32封装的WebBrowser访问一些站点时会被crash掉
- 关于 LOADIMAGE, RichEdit 的问题
HDC hdc,
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect
);
Parameters
hdc
[in] Handle to the device context.
nLeftRect
[in] Specifies the x-coordinate of the upper left corner of the bounding rectangle.
nTopRect
[in] Specifies the y-coordinate of the upper left corner of the bounding rectangle.
nRightRect
[in] Specifies the x-coordinate of the lower right corner of the bounding rectangle.
nBottomRect
[in] Specifies the y-coordinate of the lower right corner of the bounding rectangle.
楼主有长轴a,短轴b,中心(x,y);
nleft = x - (a/2);
nTop = y - (b/2);
nRight = nleft + a;
nBottom = nTop + b;
BOOL Ellipse(
int x1,
int y1,
int x2,
int y2
);
BOOL Ellipse(
LPCRECT lpRect
);
参数够用了。
Ellipse应该是带填充的
不是一个椭圆框
SelectObject一个NULL Brush再画
设置一个透明画刷CBrush *pBrush=CButton::FromHandle((HBRUSH)GetStockObject(NULL_BRUSH));选入设备描述表,就可以了