📄 empdlg1.cpp
字号:
// EmpDlg1.cpp : implementation file
//
#include "stdafx.h"
#include "My.h"
#include "EmpDlg1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEmpDlg dialog
CEmpDlg::CEmpDlg(CWnd* pParent /*=NULL*/)
: CDialog(CEmpDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CEmpDlg)
m_tBirthdate = COleDateTime::GetCurrentTime();
m_strDept = _T("");
m_nSex = -1;
m_bMarried = FALSE;
m_strName = _T("");
m_strPosition = _T("");
m_fSalary = 0.0f;
//}}AFX_DATA_INIT
}
void CEmpDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEmpDlg)
DDX_Text(pDX, IDC_BIRTHDATE, m_tBirthdate);
DDX_LBString(pDX, IDC_DEPT, m_strDept);
DDX_Radio(pDX, IDC_MALE, m_nSex);
DDX_Check(pDX, IDC_MARRIED, m_bMarried);
DDX_Text(pDX, IDC_NAME, m_strName);
DDX_CBString(pDX, IDC_POSITION, m_strPosition);
DDX_Text(pDX, IDC_SALARY, m_fSalary);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEmpDlg, CDialog)
//{{AFX_MSG_MAP(CEmpDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEmpDlg message handlers
BOOL CEmpDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CListBox *pLB = (CListBox *)GetDlgItem(IDC_DEPT);
pLB->InsertString(-1, "办公室");
pLB->InsertString(-1, "开发部");
pLB->InsertString(-1, "生产部");
pLB->InsertString(-1, "销售部");
pLB->InsertString(-1, "人事部");
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 + -