📄 find.cpp
字号:
// find.cpp : implementation file
//
#include "stdafx.h"
#include "test.h"
#include "find.h"
#include "main.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// find dialog
find::find(CWnd* pParent /*=NULL*/)
: CDialog(find::IDD, pParent)
{
//{{AFX_DATA_INIT(find)
m_nMohu = _T("");
//}}AFX_DATA_INIT
}
void find::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(find)
DDX_Text(pDX, IDC_EDIT_MOHU, m_nMohu);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(find, CDialog)
//{{AFX_MSG_MAP(find)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// find message handlers
void find::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
if(m_nMohu!="")
{
CString tmp;
tmp.Format("%%%s%%",m_nMohu);
m_nMohu=tmp;
sql.Format("select * from yonghu where number LIKE '%s' or name LIKE '%s' or bumen LIKE '%s' or zhiwei LIKE '%s'",m_nMohu,m_nMohu,m_nMohu,m_nMohu);
}
else
{
MessageBox("请输入要搜索的关键字!","提示",MB_ICONINFORMATION);
return;
}
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -