historydlg.cpp

来自「一个模仿ATM提款机的MFC程序」· C++ 代码 · 共 55 行

CPP
55
字号
// historydlg.cpp : implementation file
//

#include "stdafx.h"
#include "atm.h"
#include "historydlg.h"
#include "InputFile.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

////////////////////////查询历史纪录/////////////////////////////////////////////////////
// historydlg dialog


historydlg::historydlg(CWnd* pParent /*=NULL*/)
	: CDialog(historydlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(historydlg)
	m_history = _T("");
	//}}AFX_DATA_INIT
}


void historydlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(historydlg)
	DDX_Control(pDX, IDC_EDIT1, m_historyEdit);
	DDX_Text(pDX, IDC_EDIT1, m_history);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(historydlg, CDialog)
	//{{AFX_MSG_MAP(historydlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// historydlg message handlers

void historydlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	InputFile in;
	m_history=in.InputEdit();	//往编辑框里输入文件内容
	UpdateData(FALSE);			//显示
	
	//CDialog::OnOK();
}

⌨️ 快捷键说明

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