welcome.cpp

来自「RSA加密与解密算法的 C++实现」· C++ 代码 · 共 75 行

CPP
75
字号
// WelCome.cpp : implementation file
//

#include "stdafx.h"
#include "LockAndUnLock.h"
#include "WelCome.h"

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

/////////////////////////////////////////////////////////////////////////////
// CWelCome dialog


CWelCome::CWelCome(CWnd* pParent /*=NULL*/)
	: CDialog(CWelCome::IDD, pParent)
{
	//{{AFX_DATA_INIT(CWelCome)
	m_UserName = _T("");
	m_PassWord = _T("");
	//}}AFX_DATA_INIT
}


void CWelCome::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CWelCome)
	DDX_Text(pDX, IDC_EDIT1, m_UserName);
	DDX_Text(pDX, IDC_EDIT2, m_PassWord);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CWelCome, CDialog)
	//{{AFX_MSG_MAP(CWelCome)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWelCome message handlers

void CWelCome::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(true);

        if (m_PassWord=="123")
         m_HavePass=true;//如果密码相等,就可以进入.

		CDialog::OnOK();
}

void CWelCome::OnButton1() 
{
	// TODO: Add your control notification handler code here
	PostQuitMessage(0);
	//OnOk();
	
}

BOOL CWelCome::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_HavePass=false;
	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 + =
减小字号Ctrl + -
显示快捷键?