query.cpp

来自「基于ODBC的数据库模式」· C++ 代码 · 共 74 行

CPP
74
字号
// query.cpp : implementation file
//

#include "stdafx.h"
#include "student.h"
#include "query.h"

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

/////////////////////////////////////////////////////////////////////////////
// Cquery dialog


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


void Cquery::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Cquery)
	DDX_Control(pDX, IDC_COMBO3, m_select);
	DDX_Control(pDX, IDC_COMBO2, m_query);
	DDX_Text(pDX, IDC_EDIT1, m_find);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Cquery, CDialog)
	//{{AFX_MSG_MAP(Cquery)
	ON_WM_CANCELMODE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Cquery message handlers

void Cquery::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
    m_query.GetLBText(m_query.GetCurSel(),m_Getstring1);
	m_select.GetLBText(m_select.GetCurSel(),m_Getstring2);
	CDialog::OnOK();
}

BOOL Cquery::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_query.SetCurSel(1);
	m_select.SetCurSel(2);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void Cquery::OnCancelMode() 
{
	CDialog::OnCancelMode();
	
	// TODO: Add your message handler code here
	
}

⌨️ 快捷键说明

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