⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkchoose.cpp

📁 一个模仿ATM提款机的MFC程序
💻 CPP
字号:
// Checkchoose.cpp : implementation file
//

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

/////////////////////////////////////////////////////////////////////////////
// CCheckchoose dialog


CCheckchoose::CCheckchoose(CWnd* pParent /*=NULL*/)
	: CDialog(CCheckchoose::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCheckchoose)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CCheckchoose::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCheckchoose)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
	SetTimer(0,15000,NULL);
}


BEGIN_MESSAGE_MAP(CCheckchoose, CDialog)
	//{{AFX_MSG_MAP(CCheckchoose)
	ON_WM_TIMER()
	ON_BN_CLICKED(IDHISTORY, OnHistory)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCheckchoose message handlers

void CCheckchoose::OnOK() 
{
	// TODO: Add extra validation here
//	CCheck checkdlg;
//	checkdlg.DoModal();
	
	CDialog::OnOK();
}

BOOL CCheckchoose::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	switch(pMsg->message)
	{
	case WM_KEYUP:SetTimer(0,15000,NULL);break;
	case WM_KEYDOWN:KillTimer(0);break;
	}
	
	return CDialog::PreTranslateMessage(pMsg);
}

void CCheckchoose::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	Beep(1000,500);
	KillTimer(0);
	CAlarm alarmdlg;
	alarmdlg.DoModal();
	
	CDialog::OnTimer(nIDEvent);
}

void CCheckchoose::OnHistory() //打开历史纪录窗口
{
	// TODO: Add your control notification handler code here
	historydlg hisdlg;
	hisdlg.DoModal();
}

⌨️ 快捷键说明

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