📄 persondlg.cpp
字号:
// PersonDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Ex_Address.h"
#include "PersonDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPersonDlg dialog
CPersonDlg::CPersonDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPersonDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPersonDlg)
m_strAddress = _T("");
m_strName = _T("");
m_strType = _T("");
m_strMail = _T("");
//}}AFX_DATA_INIT
}
void CPersonDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPersonDlg)
DDX_Text(pDX, IDC_EDIT_ADDRESS, m_strAddress);
DDX_Text(pDX, IDC_EDIT_NAME, m_strName);
DDX_Text(pDX, IDC_EDIT_TYPE, m_strType);
DDX_Text(pDX, IDC_EDIT_MAIL, m_strMail);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPersonDlg, CDialog)
//{{AFX_MSG_MAP(CPersonDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPersonDlg message handlers
void CPersonDlg::OnOK()
{
UpdateData(true);
m_strName.TrimLeft();
if(m_strName.IsEmpty())
{
MessageBox("姓名不能为空!");
}
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -