?? querydlg.cpp
字號:
// QueryDlg.cpp : 實現文件
//
#include "stdafx.h"
#include "BankSystem.h"
#include "QueryDlg.h"
#include ".\querydlg.h"
// QueryDlg 對話框
IMPLEMENT_DYNAMIC(QueryDlg, CDialog)
QueryDlg::QueryDlg(CWnd* pParent /*=NULL*/)
: CDialog(QueryDlg::IDD, pParent)
, QueryStr(_T(""))
{
}
QueryDlg::~QueryDlg()
{
}
void QueryDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_QueryInput, QueryStr);
DDX_Control(pDX, IDC_LIST1, List2);
}
BEGIN_MESSAGE_MAP(QueryDlg, CDialog)
ON_BN_CLICKED(IDC_Cancel, OnBnClickedCancel)
ON_BN_CLICKED(IDC_Query, OnBnClickedQuery)
END_MESSAGE_MAP()
// QueryDlg 消息處理程序
void QueryDlg::OnBnClickedCancel()
{
// TODO: 在此添加控件通知處理程序代碼
OnOK();
}
void QueryDlg::OnBnClickedQuery()
{
// TODO: 在此添加控件通知處理程序代碼
UpdateData();
CString str="SELECT * FROM argue WHERE topic=\'"+QueryStr+"\'";
try{
pRst=pConn->Execute(_bstr_t(str),NULL,adCmdText);
}
catch(_com_error &e)
{
MessageBox(e.ErrorMessage());
return ;
}
while(!pRst->rsEOF)//將查詢到的數據加到列表框咯。
{
CString str2=" "+(_bstr_t)pRst->GetCollect("content")+" ";
List2.AddString(str2);
pRst->MoveNext();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -