?? phoneno2.cpp
字號:
// Phoneno2.cpp : implementation file
//
#include "stdafx.h"
#include "ATM.h"
#include "Phoneno2.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPhoneno2 dialog
CPhoneno2::CPhoneno2(CWnd* pParent /*=NULL*/)
: CDialog(CPhoneno2::IDD, pParent)
{
//{{AFX_DATA_INIT(CPhoneno2)
m_Phoneno2 = _T("");
//}}AFX_DATA_INIT
}
void CPhoneno2::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPhoneno2)
DDX_Control(pDX, IDC_PHONENO2, m_Phoneno2edit);
DDX_Text(pDX, IDC_PHONENO2, m_Phoneno2);
//}}AFX_DATA_MAP
SetTimer(0,15000,NULL);
}
BEGIN_MESSAGE_MAP(CPhoneno2, CDialog)
//{{AFX_MSG_MAP(CPhoneno2)
ON_BN_CLICKED(IDC_CORRECT, OnCorrect)
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPhoneno2 message handlers
void CPhoneno2::OnCorrect()
{
// TODO: Add your control notification handler code here
m_Phoneno2edit.SetWindowText("");
}
void CPhoneno2::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
void CPhoneno2::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
BOOL CPhoneno2::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 CPhoneno2::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);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -