在用MFC做小球移动的时候,发现没什么用
程序如下,大家看看有什么问题:
在OnPaint()中
hb=::CreateSolidBrush(RGB(300,100,50));//选择颜色
pDC->SelectObject(hb);//填充颜色
pDC->Ellipse(pt13.x,pt13.y,pt14.x,pt14.y);在OnTimer()中
pt13.y-=50;
pt14.y-=50;
Invalidate();
两个按钮开始和停止
void CTest04Dlg::OnButton3() 
{
// TODO: Add your control notification handler code here

xiaoqiu=SetTimer(1,1000,NULL);
}void CTest04Dlg::OnButton5() 
{
// TODO: Add your control notification handler code here
KillTimer(xiaoqiu);
}