📄 wupindel.cpp
字号:
// WuPinDel.cpp : implementation file
//
#include "stdafx.h"
#include "废品收购管理系统.h"
#include "WuPinDel.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWuPinDel dialog
CWuPinDel::CWuPinDel(CWnd* pParent /*=NULL*/)
: CDialog(CWuPinDel::IDD, pParent)
{
//{{AFX_DATA_INIT(CWuPinDel)
m_wupindel = _T("");
//}}AFX_DATA_INIT
}
void CWuPinDel::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWuPinDel)
DDX_Control(pDX, IDC_WUPINDEL, m_wupindel2);
DDX_CBString(pDX, IDC_WUPINDEL, m_wupindel);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWuPinDel, CDialog)
//{{AFX_MSG_MAP(CWuPinDel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWuPinDel message handlers
BOOL CWuPinDel::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CoInitialize(NULL);
_ConnectionPtr pCon(_uuidof(Connection));
_RecordsetPtr pRec(_uuidof(Recordset));
pCon->ConnectionTimeout=5;
pCon->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=废品交易数据库.mdb","","",adModeUnknown);
CString strSQL;
strSQL.Format("SELECT * FROM 交易物品表");
pRec->Open(_bstr_t(strSQL),
_variant_t((IDispatch*)pCon,true),
adOpenStatic,
adLockOptimistic,
adCmdText
);
while(!pRec->adoEOF)
{
m_wupindel2.AddString(_bstr_t(pRec->GetCollect("交易物品")));
pRec->MoveNext();
}
m_wupindel2.SetCurSel(0);
pRec->Close();
pCon->Close();
pRec.Release();
pCon.Release();
CoUninitialize();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -