⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchdlg.cpp

📁 专家系统是研究用解决某专门问题的专家知识来建立人机系统的方法和技术。
💻 CPP
字号:
// SEARCHDLG.cpp : implementation file
//

#include "stdafx.h"
#include "SMESWHY.h"
#include "SEARCHDLG.h"
#include "datagrid.h"


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

/////////////////////////////////////////////////////////////////////////////
// SEARCHDLG dialog


SEARCHDLG::SEARCHDLG(CWnd* pParent /*=NULL*/)
	: CDialog(SEARCHDLG::IDD, pParent)
{
	//{{AFX_DATA_INIT(SEARCHDLG)
	m_editid = _T("");
	m_editname = _T("");
	m_editzy = _T("");
	//}}AFX_DATA_INIT
}


void SEARCHDLG::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SEARCHDLG)
	DDX_Control(pDX, IDC_EDITZY, m_editzyctl);
	DDX_Control(pDX, IDC_EDITNAME, m_editnamectl);
	DDX_Control(pDX, IDC_EDITID, m_editidctl);
	DDX_Text(pDX, IDC_EDITID, m_editid);
	DDX_Text(pDX, IDC_EDITNAME, m_editname);
	DDX_Text(pDX, IDC_EDITZY, m_editzy);
	DDX_Control(pDX, IDC_DATAGRIDSTUINFO, m_dbgridinfoctl);
	DDX_Control(pDX, IDC_ADODCSEARCH, m_adosearch);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(SEARCHDLG, CDialog)
	//{{AFX_MSG_MAP(SEARCHDLG)
	ON_EN_CHANGE(IDC_EDITID, OnChangeEditid)
	ON_EN_UPDATE(IDC_EDITID, OnUpdateEditid)
	ON_EN_CHANGE(IDC_EDITNAME, OnChangeEditname)
	ON_EN_UPDATE(IDC_EDITNAME, OnUpdateEditname)
	ON_EN_CHANGE(IDC_EDITZY, OnChangeEditzy)
	ON_EN_UPDATE(IDC_EDITZY, OnUpdateEditzy)
	ON_BN_CLICKED(IDC_BUTTONSEARCH, OnButtonsearch)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// SEARCHDLG message handlers

void SEARCHDLG::OnOK() 
{
	// TODO: Add extra validation here
	
	
	
	
	m_dbgridinfoctl.ShowWindow(1);
	m_dbgridinfoctl.SetCol(1);
	m_dbgridinfoctl.GetText();

	CDialog::OnOK();
}

void SEARCHDLG::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

void SEARCHDLG::OnChangeEditid() 
{
	// 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.
	
	// TODO: Add your control notification handler code here
	
}

void SEARCHDLG::OnUpdateEditid() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_UPDATE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
	
}

void SEARCHDLG::OnChangeEditname() 
{
	// 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.
	
	// TODO: Add your control notification handler code here
	
}

void SEARCHDLG::OnUpdateEditname() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_UPDATE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
	
}

void SEARCHDLG::OnChangeEditzy() 
{
	// 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.
	
	// TODO: Add your control notification handler code here
	
}

void SEARCHDLG::OnUpdateEditzy() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_UPDATE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
	
}

void SEARCHDLG::OnButtonsearch() 
{
	// TODO: Add your control notification handler code here
	
	
	m_editidctl.GetWindowText(m_editid);
	m_id=m_editid;
	m_editnamectl.GetWindowText(m_editname);
	m_name=m_editname;
    m_editzyctl.GetWindowText(m_editzy);
	m_zy=m_editzy;
	m_dbgridinfoctl.ShowWindow(1);

	//judge condition code here
}

BOOL SEARCHDLG::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	SEARCHDLG searchdlg;	
	if(searchdlg.DoModal())
		m_editidctl.SetWindowText(" ");
		m_editnamectl.SetWindowText(" ");
		m_editzyctl.SetWindowText(" ");


	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BEGIN_EVENTSINK_MAP(SEARCHDLG, CDialog)
    //{{AFX_EVENTSINK_MAP(SEARCHDLG)
	ON_EVENT(SEARCHDLG, IDC_ADODCSEARCH, 200 /* WillMove */, OnWillMoveAdodcsearch, VTS_I4 VTS_PI4 VTS_DISPATCH)
	//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

void SEARCHDLG::OnWillMoveAdodcsearch(long adReason, long FAR* adStatus, LPDISPATCH pRecordset) 
{
	// TODO: Add your control notification handler code here
	
}

⌨️ 快捷键说明

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