⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialog2.cpp

📁 教工请假情况登记
💻 CPP
字号:
// Dialog2.cpp : implementation file
//

#include "stdafx.h"
#include "办公室负责登入教工请假情况.h"
#include "办公室负责登入教工请假情况Dlg.h"
#include "Dialog1.h"
#include "Dialog2.h"
#include "Dialog6.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDialog2 dialog


CDialog2::CDialog2(CWnd* pParent /*=NULL*/)
	: CDialog(CDialog2::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialog2)
	m_Name = _T("");
	m_Number = _T("");
	//}}AFX_DATA_INIT
}


void CDialog2::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialog2)
	DDX_Text(pDX, IDC_NAME, m_Name);
	DDX_Text(pDX, IDC_NUMBER, m_Number);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialog2, CDialog)
	//{{AFX_MSG_MAP(CDialog2)
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialog2 message handlers

void CDialog2::OnOK() 
{
	// TODO: Add extra validation here
	if(m_Name.Compare("张云")!=0&&m_Number.Compare("110023")!=0)
	{ 
	    CDialog1 dlg;
	    dlg.DoModal();
	}
	else
	{
		MessageBox("名字或密码错误,请重新输入");
	}
    
//    CDialog::OnOK();
}

void CDialog2::OnCancel() 
{
	// TODO: Add extra cleanup here
  
	
	CDialog::OnCancel();
	CMyDlg dlg;
	dlg.DoModal(); 
}

void CDialog2::OnClose() 
{
	// TODO: Add your message handler code here and/or call default

	CDialog::OnClose();

}


BOOL CDialog2::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_NAME, straInfo, RGB(0,192,0), RGB( 255,0,168) );

	straInfo.RemoveAll();
	straInfo.Add( "Enter your number" );
	m_toolTip.AddControlInfo( IDC_NUMBER, straInfo, RGB(168,255,0) );
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CDialog2::PreTranslateMessage(MSG* pMsg) 
{
	// 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 + -