📄 expenregdlg.cpp
字号:
// ExpenRegDlg.cpp : implementation file
//
#include "stdafx.h"
#include "ADODemo.h"
#include "ExpenRegDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CExpenRegDlg dialog
CExpenRegDlg::CExpenRegDlg(CWnd* pParent /*=NULL*/)
: CDialog(CExpenRegDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CExpenRegDlg)
m_strCardNo = _T("");
m_strMoney = _T("");
m_strName = _T("");
//}}AFX_DATA_INIT
}
void CExpenRegDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CExpenRegDlg)
DDX_Control(pDX, IDC_SOCIETY, m_CtrlSociety);
DDX_Text(pDX, IDC_CARDNO, m_strCardNo);
DDX_Text(pDX, IDC_MONEY, m_strMoney);
DDX_Text(pDX, IDC_NAME, m_strName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CExpenRegDlg, CDialog)
//{{AFX_MSG_MAP(CExpenRegDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CExpenRegDlg message handlers
BOOL CExpenRegDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
int i, nIdx;
for(i=0;i<m_saSocietyName.GetSize();i++){
nIdx = m_CtrlSociety.AddString(m_saSocietyName.GetAt(i));
m_CtrlSociety.SetItemData(nIdx, m_suSocietyID.GetAt(i));
}
m_CtrlSociety.SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CExpenRegDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData();
int nIdx = m_CtrlSociety.GetCurSel();
if(-1 != nIdx){
char szSocietyID[256] = {0};
UINT uSocietyID;
if(-1 != nIdx){
uSocietyID = m_CtrlSociety.GetItemData(nIdx);
m_uSocietyID = uSocietyID;
}
}
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -