?? anime.cpp
字號:
// anime.cpp : implementation file
//
#include "stdafx.h"
#include "DooDads.h"
#include "anime.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnimeDialog dialog
CAnimeDialog::CAnimeDialog(CWnd* pParent /*=NULL*/)
: CDialog(CAnimeDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CAnimeDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CAnimeDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAnimeDialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAnimeDialog, CDialog)
//{{AFX_MSG_MAP(CAnimeDialog)
ON_BN_CLICKED(IDC_PLAY, OnPlay)
ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimeDialog message handlers
void CAnimeDialog::OnPlay()
{
CAnimateCtrl* pControl;
pControl = (CAnimateCtrl*) GetDlgItem(IDC_ANIMATION);
ASSERT(pControl != NULL);
CString strName;
GetDlgItem(IDC_FILENAME)->GetWindowText(strName);
if (!pControl->Open(strName))
MessageBox(_T("Could not open file, or file had unacceptable format."));
else
if (pControl->Play(0, (UINT) -1, 1))
MessageBox(_T("Could not play file."));
}
void CAnimeDialog::OnBrowse()
{
CString strName;
GetDlgItem(IDC_FILENAME)->GetWindowText(strName);
static TCHAR szFilter[] = _T("AVI Files (*.avi) | *.avi | All Files (*.*) | *.* ||");
CFileDialog fileDlg(TRUE, _T(".AVI"), strName,
OFN_HIDEREADONLY, szFilter, this);
if (fileDlg.DoModal() == IDOK)
{
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -