testdlg.cpp

来自「一个简单的个人所得税计算器,可以编辑税率表和所在地列表.」· C++ 代码 · 共 79 行

CPP
79
字号
// TestDlg.cpp : implementation file
//

#include "stdafx.h"
#include "pitc.h"
#include "TestDlg.h"


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

/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog


CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CTestDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CTestDlg)
	m_1 = 0.0;
	m_2 = 0.0;
	m_3 = 2;
	//}}AFX_DATA_INIT
}


void CTestDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTestDlg)
	DDX_Text(pDX, IDC_EDIT1, m_1);
	DDX_Text(pDX, IDC_EDIT2, m_2);
	DDX_Text(pDX, IDC_EDIT3, m_3);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CTestDlg message handlers

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

	CDialog::OnOK();
}

void CTestDlg::OnButton1() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);

	m_2=((CPITCApp*)AfxGetApp())->Sswr(m_1,m_3);
	UpdateData(FALSE);
	CString temp;
	temp.Format("%.2f",m_2);
	//GetDlgItem(IDC_EDIT2)->SetWindowText(temp);
}

BOOL CTestDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	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 + -
显示快捷键?