有谁有好的建议?有这方面的源码吗?
解决方案 »
- 请教IOCP模型的CompletionKey和Overlapped结构的定义
- 看了不少打洞的技术文章,为什么还是不能P2P通讯???
- 卖儿买女求答案!解决一定吃大餐!
- 看看那里有错谢谢!! udp
- 关于用VC操作access的问题,搞了两天搞不好,郁闷啊,急急急啊
- 用数据库操作DBF文件后,为什么立即打开DBF文件时出错?
- 紧急求救!!!!!!!!
- CStatic Create 位置不对
- 求大神们给一个windows下的基于socket的多线程服务器程序
- 如何在对话框中某块制定区域实现滚动条?(再问一遍)
- 求助!如何截获窗口中的滚动条消息,SetWindowsHookEx中用那个钩子?WH_MSGFILTER么?
- 对现在医院的强烈不满. 请大家支持
{//画Bezier曲线
int x,y,i,j,k=100;
double t,t1,u,v;
double temp,temp1,temp2,bi;
CClientDC dc(this);
OnPrepareDC(&dc); t=1.0/k;
dc.MoveTo(pp[0]);
for(j=1;j<k;j++)
{
t1=j*t;
u=t1;
v=1-u;
x=0;
y=0;
for(i=0;i<=n;i++)
{
temp=double(fac(n)/fac(i)/fac(n-i));
temp1=powi(u,i);
temp2=powi(v,n-i);
bi=temp*temp1*temp2;
x=x+bi*pp[i].x;
y=y+bi*pp[i].y;
}
dc.LineTo(x,y);
}
dc.LineTo(pp[n]);
}
class CPoints : public CObject
{
DECLARE_SERIAL(CPoints) CPoints(); // protected constructor used by dynamic creation// Attributes
public:// Operations
public:
virtual void Serialize(CArchive& ar);
CPoint* GetPoint();
CPoints(CPoint point);
virtual ~CPoints();
CPoints &operator=(CPoints &point)
{
this->m_point=point.m_point;
return *this;
}
BOOL m_bSelected;// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPoints)
//}}AFX_VIRTUAL// Implementation
protected: // Generated message map functions
//{{AFX_MSG(CPoints)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
private:
CPoint m_point;
};
IMPLEMENT_SERIAL(CPoints, CObject,2)CPoints::CPoints()
{
m_point.x=0;
m_point.y=0;
m_bSelected=FALSE;
}CPoints::~CPoints()
{
}
/////////////////////////////////////////////////////////////////////////////
// CPoints message handlersCPoints::CPoints(CPoint point)
{
m_point.x=point.x;
m_point.y=point.y;
m_bSelected=FALSE;
}CPoint* CPoints::GetPoint()
{
return &(this->m_point);
}void CPoints::Serialize(CArchive &ar)
{
if(ar.IsStoring())
{
ar<<m_point;
}
else
{
ar>>m_point;
}}
希望对你有所帮助。