📄 prodeldlg.cpp
字号:
// ProDelDlg.cpp : implementation file
//
#include "stdafx.h"
#include "FileMaSys.h"
#include "ProDelDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CFileMaSysApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CProDelDlg dialog
CProDelDlg::CProDelDlg(CWnd* pParent /*=NULL*/)
: CDialog(CProDelDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CProDelDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CProDelDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProDelDlg)
DDX_Control(pDX, IDC_COMBO_PRONAME, m_ProNameControl);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CProDelDlg, CDialog)
//{{AFX_MSG_MAP(CProDelDlg)
ON_CBN_SELCHANGE(IDC_COMBO_PRONAME, OnSelchangeComboProname)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CProDelDlg message handlers
BOOL CProDelDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CString sql1,str2;
sql1="Select * From ProjectInfo";
m_pRecordID.CreateInstance("ADODB.Recordset");
m_pRecordID->Open((_variant_t)sql1,_variant_t((IDispatch *)theApp.m_pConnection,true),adOpenDynamic,
adLockPessimistic,adCmdText);
while (!m_pRecordID->adEOF)
{
str2=m_pRecordID->GetCollect("ProjectName").bstrVal;
m_ProNameControl.AddString(str2);
m_pRecordID->MoveNext();
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CProDelDlg::OnSelchangeComboProname()
{
// TODO: Add your control notification handler code here
int i=m_ProNameControl.GetCurSel();
m_ProNameControl.GetLBText(i,m_cProName);
// m_ProNameControl.GetWindowText(m_cProName);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -