15,979
社区成员
发帖
与我相关
我的任务
分享
void CAnimateView::OnInitialUpdate()
{
CCtrlView::OnInitialUpdate();
// really create the obj.
CRect rc;
GetClientRect(&rc);
m_MyAnimate.Create("SysAnimate32","",WS_CHILD|WS_VISIBLE|ACS_CENTER,rc,this,0,NULL);
//
CMyAnimateCtrl &anim=GetAnimateCtrl();
// you may use m_MyAnimate
anim.Open("FILECOPY.AVI");
anim.m_LastAvi="FILECOPY.AVI";
anim.Play(0,-1,-1);
]
class CMyAnimateCtrl : public CAnimateCtrl
{
// Construction
public:
CMyAnimateCtrl();
BOOL RegisterMyself();
CString m_LastAvi;
void ChangeAvi(CString &Path);
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyAnimateCtrl)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyAnimateCtrl();
// Generated message map functions
protected:
//{{AFX_MSG(CMyAnimateCtrl)
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void ParentNotify(UINT message, LPARAM lParam);
afx_msg void OnDropFiles(HDROP hDrop);
afx_msg void OnStart();
afx_msg void OnStop();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};