📄 dialog5.cpp
字号:
// Dialog5.cpp : implementation file
//
#include "stdafx.h"
#include "办公室负责登入教工请假情况.h"
#include "办公室负责登入教工请假情况Dlg.h"
#include "Dialog5.h"
#include "Dialog6.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDialog5 dialog
CDialog5::CDialog5(CWnd* pParent /*=NULL*/)
: CDialog(CDialog5::IDD, pParent)
{
//{{AFX_DATA_INIT(CDialog5)
m_Name5 = _T("");
m_Number5 = _T("");
//}}AFX_DATA_INIT
}
void CDialog5::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDialog5)
DDX_Text(pDX, IDC_NAME5, m_Name5);
DDX_Text(pDX, IDC_NUMBER5, m_Number5);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDialog5, CDialog)
//{{AFX_MSG_MAP(CDialog5)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDialog5 message handlers
void CDialog5::OnOK()
{
// TODO: Add extra validation here
if(strcmp(m_Name5,"张云")&&strcmp(m_Number5,"110023"))
{
CDialog6 dlg;
dlg.DoModal();
}
else
{
MessageBox("名字或密码错误,请重新输入");
}
CDialog::OnOK();
}
void CDialog5::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
BOOL CDialog5::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_toolTip.Create( this );
CStringArray straInfo;
straInfo.RemoveAll();
straInfo.Add( "Enter your Full Name" );
m_toolTip.AddControlInfo( IDC_NAME5, straInfo, RGB(0,168,192), RGB( 255,0,168) );
straInfo.RemoveAll();
straInfo.Add( "Enter your number" );
m_toolTip.AddControlInfo( IDC_NUMBER5, straInfo, RGB(168,255,192) );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CDialog5::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
// TODO: Add your specialized code here and/or call the base class
if( pMsg->message == WM_MOUSEMOVE )
{
POINT pt = pMsg->pt;
ScreenToClient( &pt );
m_toolTip.ShowToolTip( (CPoint)pt );
}
return CDialog::PreTranslateMessage(pMsg);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -