?? animate.cpp
字號(hào):
// Animate.cpp : implementation file
//
#include "stdafx.h"
#include "Tab.h"
#include "Animate.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnimate property page
IMPLEMENT_DYNCREATE(CAnimate, CPropertyPage)
CAnimate::CAnimate() : CPropertyPage(CAnimate::IDD)
{
//{{AFX_DATA_INIT(CAnimate)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CAnimate::~CAnimate()
{
}
void CAnimate::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAnimate)
DDX_Control(pDX, IDC_FLASHLIGHTRUN, m_flashlightrun);
DDX_Control(pDX, IDC_FLASHLIGHTPLAY, m_flashlightplay);
DDX_Control(pDX, IDC_FILECOPYRUN, m_filecopyrun);
DDX_Control(pDX, IDC_FILECOPYPLAY, m_filecopyplay);
DDX_Control(pDX, IDC_DILLORUN, m_dillorun);
DDX_Control(pDX, IDC_DILLOPLAY, m_dilloplay);
DDX_Control(pDX, IDC_FLASHLIGHT, m_flashlight);
DDX_Control(pDX, IDC_FILECOPY, m_filecopy);
DDX_Control(pDX, IDC_ARMADILLO, m_armadillo);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAnimate, CPropertyPage)
//{{AFX_MSG_MAP(CAnimate)
ON_BN_CLICKED(IDC_DILLOPLAY, OnDilloplay)
ON_BN_CLICKED(IDC_DILLORUN, OnDillorun)
ON_BN_CLICKED(IDC_FLASHLIGHTPLAY, OnFlashlightplay)
ON_BN_CLICKED(IDC_FLASHLIGHTRUN, OnFlashlightrun)
ON_BN_CLICKED(IDC_FILECOPYPLAY, OnFilecopyplay)
ON_BN_CLICKED(IDC_FILECOPYRUN, OnFilecopyrun)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimate message handlers
BOOL CAnimate::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
m_armadillo.Stop ();
m_armadillo.Close ();
int result = m_armadillo.Open (MAKEINTRESOURCE(IDR_AVI_DILLO));
if (result)
m_armadillo.Play(0, 0xffff, -1);
m_dillorunning = true;
m_dilloplay.SetWindowText ("Stop");
m_filecopy.Stop ();
m_filecopy.Close ();
result = m_filecopy.Open (MAKEINTRESOURCE(IDR_AVI_FILECOPY));
if (result)
m_filecopy.Play(0, 0xffff, -1);
m_filecopyrunning = true;
m_filecopyplay.SetWindowText ("Stop");
m_flashlight.Stop ();
m_flashlight.Close ();
result = m_flashlight.Open (MAKEINTRESOURCE(IDR_AVI_SEARCH));
if (result)
m_flashlight.Play(0, 0xffff, -1);
m_flashlightrunning = true;
m_flashlightplay.SetWindowText ("Stop");
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CAnimate::OnDilloplay()
{
// TODO: Add your control notification handler code here
if (m_dillorunning == true)
{
m_dilloplay.SetWindowText ("Play");
m_armadillo.Stop ();
m_dillorunning = false;
}
else
{
m_dilloplay.SetWindowText ("Play");
m_armadillo.Play (0, -1, 1);
}
}
void CAnimate::OnDillorun()
{
// TODO: Add your control notification handler code here
m_dilloplay.SetWindowText ("Stop");
m_armadillo.Play (0, -1, -1);
m_dillorunning = true;
}
void CAnimate::OnFlashlightplay()
{
// TODO: Add your control notification handler code here
if (m_flashlightrunning == true)
{
m_flashlightplay.SetWindowText ("Play");
m_flashlight.Stop ();
m_flashlightrunning = false;
}
else
{
m_flashlightplay.SetWindowText ("Play");
m_flashlight.Play (0, -1, 1);
}
}
void CAnimate::OnFlashlightrun()
{
// TODO: Add your control notification handler code here
m_flashlightplay.SetWindowText ("Stop");
m_flashlight.Play (0, -1, -1);
m_flashlightrunning = true;
}
void CAnimate::OnFilecopyplay()
{
// TODO: Add your control notification handler code here
if (m_filecopyrunning == true)
{
m_filecopyplay.SetWindowText ("Play");
m_filecopy.Stop ();
m_filecopyrunning = false;
}
else
{
m_filecopyplay.SetWindowText ("Play");
m_filecopy.Play (0, -1, 1);
}
}
void CAnimate::OnFilecopyrun()
{
// TODO: Add your control notification handler code here
m_filecopyplay.SetWindowText ("Stop");
m_filecopy.Play (0, -1, -1);
m_filecopyrunning = true;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -