⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 animate.cpp

📁 本文件包包含了大量用VC++开发的应用程序界面
💻 CPP
字号:
// 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;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -