您的位置:首页 > 其它

利用Animate Control 播放动画失败!!

2013-04-21 11:17 225 查看
自己按照书上的代码去做一个播放动画的程序,不知道为什么失败啊!!

自己添加了一个Animate控件,两个button控件。

他们的ID为IDC_ANIMATE,IDC_START,IDC_STOP;

分别添加了成员变量

IDC_ANIMATE->m_cDonghua;

IDC_START->m_CStart;

IDC_STOP->m_CStop;

BOOL CShow_MoveDlg::OnInitDialog()

{

CDialog::OnInitDialog();

......

if (FALSE==m_cDonghua.Open("a.***I"))

{

MessageBox("打开视频失败!!");

}

m_CStop.EnableWindow(FALSE);

}

void CShow_MoveDlg::OnStart()

{

// TODO: Add your control notification handler code here

m_cDonghua.Play(0,-1,-1);

m_CStop.EnableWindow(TRUE);

m_CStart.EnableWindow(FALSE);

}

void CShow_MoveDlg::OnStop()

{

// TODO: Add your control notification handler code here

m_cDonghua.Stop();

m_CStop.EnableWindow(FALSE);

m_CStart.EnableWindow(TRUE);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: