📄 historydlg.cpp
字号:
// HistoryDlg.cpp : 实现文件
//
#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)//将查询到的数据加到列表框咯。
{
CString str=""+(_bstr_t)pRst->GetCollect("uname")+" "+(_bstr_t)pRst->GetCollect("topic")+" "+(_bstr_t)pRst->GetCollect("content")+"";
List1.AddString(str);
pRst->MoveNext();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -