📄 chanegpass.cpp
字号:
// Chanegpass.cpp : implementation file
//
#include "stdafx.h"
#include "ATM.h"
#include "Chanegpass.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChanegpass dialog
CChanegpass::CChanegpass(CWnd* pParent /*=NULL*/)
: CDialog(CChanegpass::IDD, pParent)
{
//{{AFX_DATA_INIT(CChanegpass)
m_newpassword1 = _T("");
//}}AFX_DATA_INIT
}
void CChanegpass::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChanegpass)
DDX_Control(pDX, IDC_NEWPASSWORD, m_newedit);
DDX_Text(pDX, IDC_NEWPASSWORD, m_newpassword1);
//}}AFX_DATA_MAP
SetTimer(0,15000,NULL);
}
BEGIN_MESSAGE_MAP(CChanegpass, CDialog)
//{{AFX_MSG_MAP(CChanegpass)
ON_BN_CLICKED(IDC_CORRECT, OnCorrect)
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChanegpass message handlers
void CChanegpass::OnCorrect()
{
// TODO: Add your control notification handler code here
m_newedit.SetWindowText("");
}
void CChanegpass::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
BOOL CChanegpass::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);
if(m_newedit.GetWindowTextLength()==6)CDialog::OnOK();
break;
case WM_KEYDOWN:KillTimer(0);break;
}
return CDialog::PreTranslateMessage(pMsg);
}
void CChanegpass::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 + -