📄 passdlg.cpp
字号:
// PASSDLG.cpp : implementation file
//
#include "stdafx.h"
#include "lxy.h"
#include "PASSDLG.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// PASSDLG dialog
PASSDLG::PASSDLG(CWnd* pParent /*=NULL*/)
: CDialog(PASSDLG::IDD, pParent)
{
//{{AFX_DATA_INIT(PASSDLG)
m_users = _T("");
m_pass = _T("");
//}}AFX_DATA_INIT
}
void PASSDLG::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(PASSDLG)
DDX_Text(pDX, IDC_EDIT1, m_users);
DDX_Text(pDX, IDC_EDIT2, m_pass);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(PASSDLG, CDialog)
//{{AFX_MSG_MAP(PASSDLG)
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// PASSDLG message handlers
void PASSDLG::OnTimer(UINT nIDEvent)
{
t--;
CString str;
str.Format("%d秒后登陆窗口自动关闭",t);
SetWindowText(str);
if(t==0)
OnCancel();
CDialog::OnTimer(nIDEvent);
}
BOOL PASSDLG::OnInitDialog()
{
CDialog::OnInitDialog();
t=10;
SetTimer(1,1000,NULL);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void PASSDLG::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -