setportdlg.cpp

来自「自己刚编的一个串口测试程序,可以下下来看一下,」· C++ 代码 · 共 54 行

CPP
54
字号
// SetPortDlg.cpp : implementation file
//

#include "stdafx.h"
#include "SerialPortAPI.h"
#include "SetPortDlg.h"
#include "SerialPortAPIDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// SetPortDlg dialog


SetPortDlg::SetPortDlg(CWnd* pParent /*=NULL*/)
	: CDialog(SetPortDlg::IDD, pParent)
{
	CSerialPortAPIDlg cspad;
	//{{AFX_DATA_INIT(SetPortDlg)
	m_nBaudRate = _T("9600");
	m_nByteSize = _T("8");
	m_strStopBits = _T("onebit");
	//}}AFX_DATA_INIT
	
}


void SetPortDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SetPortDlg)
	DDX_Control(pDX, IDC_STOPBITS, m_StopBits);
	DDX_Control(pDX, IDC_BYTESIZE, m_ByteSize);
	DDX_Control(pDX, IDC_BAUDRATE, m_BaudRate);
	DDX_CBString(pDX, IDC_BAUDRATE, m_nBaudRate);
	DDX_CBString(pDX, IDC_BYTESIZE, m_nByteSize);
	DDX_CBString(pDX, IDC_STOPBITS, m_strStopBits);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(SetPortDlg, CDialog)
	//{{AFX_MSG_MAP(SetPortDlg)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// SetPortDlg message handlers

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?