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