void CSView::OnChangCircles()
{
// TODO: Add your command handler code here
CDC *pDC=this->GetDC();
CChangingCircles ChC;
int R,r;
if(ChC.DoModal()==IDOK)
{
R=ChC.m_R ;
r=ChC.m_r ;
}
CRect Rect;
GetClientRect(&Rect);
int a=Rect.right ;
int b=Rect.bottom ;
for(double i=0;i<=2*PI;i=i+PI/20)
{
double x=(a/2-R*sin(i));
double y=(b/2+R*cos(i));
pDC->Ellipse (int(x-r+0.5),int(y-r+0.5),int(x+r+0.5),int(y+r+0.5)); }}
{
// TODO: Add your command handler code here
CDC *pDC=this->GetDC();
CChangingCircles ChC;
int R,r;
if(ChC.DoModal()==IDOK)
{
R=ChC.m_R ;
r=ChC.m_r ;
}
CRect Rect;
GetClientRect(&Rect);
int a=Rect.right ;
int b=Rect.bottom ;
for(double i=0;i<=2*PI;i=i+PI/20)
{
double x=(a/2-R*sin(i));
double y=(b/2+R*cos(i));
pDC->Ellipse (int(x-r+0.5),int(y-r+0.5),int(x+r+0.5),int(y+r+0.5)); }}
解决方案 »
- vs2005 中的Visual c++ components在哪 我想找一下ADO DATA Bound Dialog控件
- 请问要使用 DHCPNOTIFYPROC 需要包含那个头文件?在线等,谢谢!
- 关于服务器的问题。我很菜,所以要详细点儿的!谢谢大家!
- Picture控件中加载的位图怎样实现拖动,缩小,放大? 希望能给出个例子
- debug版程序可以插入进程而release版程序却不能插入进程
- 很简单的问题,请进
- 请问如何延时?
- 我傻比了,SetDlgItemText会吞噬系统资源的。
- 使用mapx开发时sleep函数失效
- 有哪位看过孙鑫的书,问个问题,第10章里面
- error C2660: 'Create' : function does not take 5 parameters
- 生日散分,发个帖子纪念下。同时发布Crimm Imageshop 2.2版本,望大家支持。
double转成Int时 尽量都采用整形,比如 5, x = 2, y = 2吧,多出的1不要好了