📄 setupdialog.cpp
字号:
// SetupDialog.cpp : implementation file
//
#include "stdafx.h"
#include "Comm.h"
#include "SetupDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetupDialog dialog
CSetupDialog::CSetupDialog(CWnd* pParent /*=NULL*/)
: CDialog(CSetupDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetupDialog)
m_port = 1;
//}}AFX_DATA_INIT
}
void CSetupDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetupDialog)
DDX_Control(pDX, IDC_COMBO1, m_Crate);
DDX_Text(pDX, IDC_EDIT1, m_port);
DDV_MinMaxInt(pDX, m_port, 1, 4);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetupDialog, CDialog)
//{{AFX_MSG_MAP(CSetupDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetupDialog message handlers
void CSetupDialog::OnOK()
{
// TODO: Add extra validation here
UpdateData();
m_rate=m_Crate.GetCurSel();
CDialog::OnOK();
}
BOOL CSetupDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_Crate.SetCurSel(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 + -