?? surrogate.cpp
字號(hào):
// Surrogate.cpp : implementation file
//
#include "stdafx.h"
#include "ATM.h"
#include "Surrogate.h"
#include "Water.h"
#include "GAS.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSurrogate dialog
CSurrogate::CSurrogate(CWnd* pParent /*=NULL*/)
: CDialog(CSurrogate::IDD, pParent)
{
//{{AFX_DATA_INIT(CSurrogate)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CSurrogate::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSurrogate)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
SetTimer(0,15000,NULL);
}
BEGIN_MESSAGE_MAP(CSurrogate, CDialog)
//{{AFX_MSG_MAP(CSurrogate)
ON_WM_TIMER()
ON_BN_CLICKED(IDOK2, OnOk2)
ON_BN_CLICKED(IDOK3, OnOk3)
ON_BN_CLICKED(IDOK4, OnOk4)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSurrogate message handlers
void CSurrogate::OnOK()
{
// TODO: Add extra validation here
CPhoneno phonenodlg;
phonenodlg.DoModal();
CDialog::OnOK();
}
BOOL CSurrogate::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 CSurrogate::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 CSurrogate::OnOk2()
{
// TODO: Add your control notification handler code here
TELEPHONE telephonedlg;
telephonedlg.DoModal();
}
void CSurrogate::OnOk3()
{
// TODO: Add your control notification handler code here
WATER waterdlg;
waterdlg.DoModal();
}
void CSurrogate::OnOk4()
{
GAS gasdlg;
gasdlg.DoModal();
// TODO: Add your control notification handler code here
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -