percent.cpp

来自「这是我自己写的wince程序」· C++ 代码 · 共 59 行

CPP
59
字号
// Percent.cpp : implementation file
//

#include "stdafx.h"
#include "WinCEJob.h"
#include "Percent.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPercent dialog


CPercent::CPercent(CWnd* pParent /*=NULL*/)
	: CDialog(CPercent::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPercent)
	m_percent = 0;
	//}}AFX_DATA_INIT
}


void CPercent::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPercent)
	DDX_Text(pDX, IDC_EDIT1, m_percent);
	DDV_MinMaxInt(pDX, m_percent, 0, 100);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPercent, CDialog)
	//{{AFX_MSG_MAP(CPercent)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPercent message handlers

void CPercent::OnOK() 
{
	// TODO: Add extra validation here
	

}
int percent;
void CPercent::OnButton1() 
{
	UpdateData(true);
	percent = this->m_percent;
	CDialog::OnOK();
}

⌨️ 快捷键说明

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