dlgprogress.cpp

来自「虚拟光驱程序」· C++ 代码 · 共 87 行

CPP
87
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?