📄 settingdlg.cpp
字号:
// SettingDlg.cpp : implementation file
//
#include "stdafx.h"
#include "inf of com.h"
#include "SettingDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSettingDlg dialog
CSettingDlg::CSettingDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSettingDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSettingDlg)
m_RVByte = _T("");
m_VByte = _T("");
m_EndAdd = _T("");
m_StartAdd = _T("");
//}}AFX_DATA_INIT
}
void CSettingDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSettingDlg)
DDX_Text(pDX, IDC_EDIT_RVByte, m_RVByte);
DDX_Text(pDX, IDC_EDIT_VByte, m_VByte);
DDX_Text(pDX, IDC_EDIT_EndAdd, m_EndAdd);
DDX_Text(pDX, IDC_EDIT_StartAdd, m_StartAdd);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSettingDlg, CDialog)
//{{AFX_MSG_MAP(CSettingDlg)
ON_BN_CLICKED(IDC_BUTTON_Enter, OnBUTTONEnter)
ON_BN_CLICKED(IDC_BUTTON_Cancel, OnBUTTONCancel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSettingDlg message handlers
void CSettingDlg::OnOK()
{
// TODO: Add extra validation here
// CDialog::OnOK();
}
void CSettingDlg::OnBUTTONEnter()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
::PostMessage(GetParent()->m_hWnd,WM_SETTINGS,0,0);
}
void CSettingDlg::OnBUTTONCancel()
{
// TODO: Add your control notification handler code here
CDialog::OnOK();
}
BOOL CSettingDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_VByte="28800,n,8,1";
m_RVByte="28800,n,8,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 + -