📄 dlgsetport.cpp
字号:
// DlgSetPort.cpp : implementation file
//
#include "stdafx.h"
#include "PCM120.h"
#include "DlgSetPort.h"
#include "DlgAllStaSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgSetPort dialog
CDlgSetPort::CDlgSetPort(CWnd* pParent /*=NULL*/)
: CDialog(CDlgSetPort::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgSetPort)
m_iPert = 0;
//}}AFX_DATA_INIT
}
void CDlgSetPort::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgSetPort)
DDX_Text(pDX, IDC_EDIT_PORTSET, m_iPert);
DDV_MinMaxInt(pDX, m_iPert, 1000, 3000);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgSetPort, CDialog)
//{{AFX_MSG_MAP(CDlgSetPort)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgSetPort message handlers
void CDlgSetPort::OnOK()
{
// TODO: Add extra validation here
UpdateData(true);
CString strPert;
strPert.Format("%d",m_iPert);
CString strPath;
CDlgAllStaSet dlgallstaset;
dlgallstaset.GetModulePath(strPath,NULL);
strPath += "config.ini";
WritePrivateProfileString("General","波特率",strPert,strPath);
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -