📄 find.cpp
字号:
// Find.cpp : implementation file
//
#include "stdafx.h"
#include "system.h"
#include "Find.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFind dialog
CFind::CFind(CWnd* pParent /*=NULL*/)
: CDialog(CFind::IDD, pParent)
{
//{{AFX_DATA_INIT(CFind)
m_findname = _T("");
m_birth = _T("");
//}}AFX_DATA_INIT
changename=changebirth=false;
}
void CFind::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFind)
DDX_Text(pDX, IDC_NAME, m_findname);
DDX_Text(pDX, IDC_BIRTH, m_birth);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFind, CDialog)
//{{AFX_MSG_MAP(CFind)
ON_EN_CHANGE(IDC_NAME, OnChangename)
ON_EN_CHANGE(IDC_BIRTH, OnChangeBirth)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFind message handlers
void CFind::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.
changename=true;
// TODO: Add your control notification handler code here
}
void CFind::OnOK()
{
// TODO: Add extra validation here
if(!changename)
MessageBox("请输入要查找的档案的姓名",NULL,MB_ICONERROR);
else
CDialog::OnOK();
}
void CFind::OnChangeBirth()
{
// 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.
changebirth=true;
// TODO: Add your control notification handler code here
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -