📄 passdlg.cpp
字号:
// PASSDLG.cpp : implementation file
//
#include "stdafx.h"
#include "cyj.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_password = _T("");
m_user = _T("");
//}}AFX_DATA_INIT
}
void PASSDLG::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(PASSDLG)
DDX_Text(pDX, IDC_PASSWORD, m_password);
DDX_Text(pDX, IDC_USER, m_user);
//}}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==-1)
{
KillTimer(1);
OnCancel();
}
CDialog::OnTimer(nIDEvent);
}
BOOL PASSDLG::OnInitDialog()
{
CDialog::OnInitDialog();
UpdateData(FALSE);
SetTimer(1,1000,NULL);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -