delete.cpp

来自「人事管理系统」· C++ 代码 · 共 67 行

CPP
67
字号
// Delete.cpp : implementation file
//

#include "stdafx.h"
#include "system.h"
#include "Delete.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDelete dialog


CDelete::CDelete(CWnd* pParent /*=NULL*/)
	: CDialog(CDelete::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDelete)
	m_name = _T("");
	m_birth = _T("");
	//}}AFX_DATA_INIT
	changname=false;
}


void CDelete::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDelete)
	DDX_Text(pDX, IDC_EDIT1, m_name);
	DDX_Text(pDX, IDC_EDIT2, m_birth);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDelete, CDialog)
	//{{AFX_MSG_MAP(CDelete)
	ON_EN_CHANGE(IDC_EDIT1, OnChangename)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDelete message handlers

void CDelete::OnChangename() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	changname=true;
	// TODO: Add your control notification handler code here
	
}

void CDelete::OnOK() 
{
	// TODO: Add extra validation here
	if(!changname)
		MessageBox("请输入档案的姓名",NULL,MB_ICONERROR);
	else
		CDialog::OnOK();
}

⌨️ 快捷键说明

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