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

📄 dlgprogress.cpp

📁 虚拟光驱程序
💻 CPP
字号:
// DlgProgress.cpp : implementation file
//

#include "stdafx.h"
#include "Speedcd.h"
#include "DlgProgress.h"

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

/////////////////////////////////////////////////////////////////////////////
// DlgProgress dialog


DlgProgress::DlgProgress(CWnd* pParent /*=NULL*/)
	: CDialog(DlgProgress::IDD, pParent)
{
	//{{AFX_DATA_INIT(DlgProgress)
	m_sMessage = _T("");
	//}}AFX_DATA_INIT
	m_bCancel = FALSE;
	
}


void DlgProgress::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(DlgProgress)
	DDX_Control(pDX, IDC_PROGRESS1, m_cProgress);
	DDX_Text(pDX, IDC_MESSAGE, m_sMessage);

		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(DlgProgress, CDialog)
	//{{AFX_MSG_MAP(DlgProgress)
	ON_WM_TIMER()
	ON_BN_CLICKED(IDC_UPDATE, OnUpdate)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// DlgProgress message handlers

void DlgProgress::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	if (nIDEvent == 99)
	{
		UpdateData(FALSE);
		UpdateWindow();
		SetTimer(99,1000,NULL);
	}else
		CDialog::OnTimer(nIDEvent);
	//CDialog::OnTimer(nIDEvent);
}

void DlgProgress::OnUpdate() 
{
	// TODO: Add your control notification handler code here
	UpdateData(FALSE);
	UpdateWindow();
}

void DlgProgress::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	m_bCancel = TRUE;
	CDialog::OnCancel();
}

BOOL DlgProgress::OnInitDialog() 
{
	CDialog::OnInitDialog();
	// TODO: Add extra initialization here
	SetTimer(99,1000,NULL);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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