📄 comsetting.cpp
字号:
// Comsetting.cpp : implementation file
//
#include "stdafx.h"
#include "FFT_PROJECT.h"
#include "Comsetting.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CComsetting dialog
CComsetting::CComsetting(CWnd* pParent /*=NULL*/)
: CDialog(CComsetting::IDD, pParent)
{ myView=(CScrollView *) pParent;
pDoc=(CFFT_PROJECTDoc*)myView->GetDocument();
m_comoff=AfxGetApp()->LoadIcon(IDI_ICON2);
m_comon=AfxGetApp()->LoadIcon(IDI_ICON1);
//{{AFX_DATA_INIT(CComsetting)
m_com1baud = _T("");
m_com1databits = _T("");
m_com1aparity = _T("");
m_com1stopbits = _T("");
m_com2baud = _T("");
m_com2databits = _T("");
m_com2parity = _T("");
m_com2stopbits = _T("");
//}}AFX_DATA_INIT
}
void CComsetting::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CComsetting)
DDX_Control(pDX, IDC_COM2STATUS, m_com2openoff);
DDX_Control(pDX, IDC_COM1STATUS, m_com1openoff);
DDX_CBString(pDX, IDC_COM1BAUD, m_com1baud);
DDX_CBString(pDX, IDC_COM1DATABIT, m_com1databits);
DDX_CBString(pDX, IDC_COM1PARITY, m_com1aparity);
DDX_CBString(pDX, IDC_COM1STOPBITS, m_com1stopbits);
DDX_CBString(pDX, IDC_COM2BAUD, m_com2baud);
DDX_CBString(pDX, IDC_COM2DATABITS, m_com2databits);
DDX_CBString(pDX, IDC_COM2PARITY, m_com2parity);
DDX_CBString(pDX, IDC_COM2STOPBITS, m_com2stopbits);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CComsetting, CDialog)
//{{AFX_MSG_MAP(CComsetting)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CComsetting message handlers
void CComsetting::OnOK()
{
// TODO: Add extra validation here
pDoc->com1_baud=m_com1baud;
pDoc->com1_databits=m_com1databits;
pDoc->com1_datastopbits=m_com1stopbits;
pDoc->com1_dataparity=m_com1aparity;
pDoc->com2_baud=m_com2baud;
pDoc->com2_databits=m_com2databits;
pDoc->com2_datastopbits=m_com2stopbits;
pDoc->com2_dataparity=m_com2parity;
UpdateData(true);
ShowWindow(SW_HIDE);
// CDialog::OnOK();
}
void CComsetting::OnCancel()
{
// TODO: Add extra cleanup here
ShowWindow(SW_HIDE);
//CDialog::OnCancel();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -