📄 newcity.cpp
字号:
// newcity.cpp : implementation file
//
#include "stdafx.h"
#include "airline.h"
#include "newcity.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// newcity dialog
newcity::newcity(CWnd* pParent /*=NULL*/)
: CDialog(newcity::IDD, pParent)
{
//{{AFX_DATA_INIT(newcity)
m_newcity = _T("");
//}}AFX_DATA_INIT
}
void newcity::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(newcity)
DDX_Control(pDX, IDC_NEWCITY, m_ccity);
DDX_Text(pDX, IDC_NEWCITY, m_newcity);
DDV_MaxChars(pDX, m_newcity, 10);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(newcity, CDialog)
//{{AFX_MSG_MAP(newcity)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// newcity message handlers
void newcity::OnOK()
{
// TODO: Add extra validation here
m_ccity.GetWindowText(m_newcity);
if(m_newcity.IsEmpty())
{
MessageBox("请输入终点名!","错误!",MB_ICONWARNING);
this->GotoDlgCtrl(GetDlgItem(IDC_NEWCITY));
return;
}
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -