📄 wcefirstdialog.cpp
字号:
// WCEFirstDialog.cpp : implementation file
//
#include "stdafx.h"
#include "WCEFirstApp.h"
#include "WCEFirstDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWCEFirstDialog dialog
CWCEFirstDialog::CWCEFirstDialog(CWnd* pParent /*=NULL*/)
: CDialog(CWCEFirstDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CWCEFirstDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CWCEFirstDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWCEFirstDialog)
DDX_Control(pDX, IDC_PROGRESS1, m_progressCtrl);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWCEFirstDialog, CDialog)
//{{AFX_MSG_MAP(CWCEFirstDialog)
ON_BN_CLICKED(IDB_START_BTN, OnStartBtn)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWCEFirstDialog message handlers
BOOL CWCEFirstDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_progressCtrl.SetRange(0,30000);
m_progressCtrl.SetStep(1);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CWCEFirstDialog::OnStartBtn()
{
for(int i = 0; i <=30000; i++)
{
m_progressCtrl.StepIt();
}
AfxMessageBox(_T("Progress Complete!!!"), MB_OK);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -