?? 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 + -