unlockwin.cpp

来自「一个简易超市系统,有进货,销售.等功能 对学习有C++数据库操作有一定的帮助」· C++ 代码 · 共 54 行

CPP
54
字号
// UnlockWin.cpp : implementation file
// 前台解锁类

#include "stdafx.h"
#include "PosClient.h"
#include "UnlockWin.h"

extern CString temppsw;

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

/////////////////////////////////////////////////////////////////////////////
// CUnlockWin dialog


CUnlockWin::CUnlockWin(CWnd* pParent /*=NULL*/)
	: CDialog(CUnlockWin::IDD, pParent)
{
	//{{AFX_DATA_INIT(CUnlockWin)
	m_psw = _T("");
	//}}AFX_DATA_INIT
}


void CUnlockWin::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CUnlockWin)
	DDX_Text(pDX, IDC_EDIT1, m_psw);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CUnlockWin, CDialog)
	//{{AFX_MSG_MAP(CUnlockWin)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUnlockWin message handlers

void CUnlockWin::OnOK() 
{
	UpdateData(true);
	//密码验证
	if(m_psw!=temppsw) {MessageBox("密码错误!","提示!");return;}
	CDialog::OnOK();
	UpdateData(false);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?