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

📄 flashdlg.cpp

📁 当前很多应用系统都在启动的时候弹出一个漂亮的UI界面
💻 CPP
字号:
// FlashDLG.cpp : implementation file
//

#include "stdafx.h"
#include "gds.h"
#include "FlashDLG.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// FlashDLG dialog


FlashDLG::FlashDLG(CWnd* pParent /*=NULL*/)
	: CDialog(FlashDLG::IDD, pParent)
{
	//{{AFX_DATA_INIT(FlashDLG)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void FlashDLG::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(FlashDLG)
	DDX_Control(pDX, IDC_SHOCKWAVEFLASH1, m_flash);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(FlashDLG, CDialog)
	//{{AFX_MSG_MAP(FlashDLG)
	ON_WM_CREATE()
	ON_WM_TIMER()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// FlashDLG message handlers

int FlashDLG::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
	
	return 0;
}

BOOL FlashDLG::OnInitDialog() 
{
	CDialog::OnInitDialog();
	char szPath[1024];
	memset(szPath,0,1024);
	GetModuleFileName(AfxGetApp()->m_hInstance,szPath,1024);
	CString str=szPath;
	CString path =	str.Left(str.ReverseFind('\\'));
	path+="\\1.swf";
	sprintf(szPath,"%s",path);
	strcat(	szPath,"\\1.swf");
	m_flash.SetEmbedMovie(true);
	m_flash.SetMovie(path);
	SetTimer(1,10000,NULL);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void FlashDLG::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	if (nIDEvent==1)
	{
		this->EndDialog(IDCANCEL);
	}
	CDialog::OnTimer(nIDEvent);
}

void FlashDLG::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
// 	CRect rc;
// 	GetClientRect(&rc);
// 	m_flash.MoveWindow(&rc,TRUE);
}

⌨️ 快捷键说明

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