代码拉取完成,页面将自动刷新
// CConfig1ppsPulseWidthDlg.cpp
//
#include "stdafx.h"
#include "Resource.h"
#include "Config1ppsPulseWidthDlg.h"
// CConfig1ppsPulseWidthDlg
IMPLEMENT_DYNAMIC(CConfig1ppsPulseWidthDlg, CDialog)
CConfig1ppsPulseWidthDlg::CConfig1ppsPulseWidthDlg(CWnd* pParent /*=NULL*/)
: CDialog(IDD_CONFIG_1PPS_PULSE_WIDTH, pParent)
{
m_nPulseWidth = 0;
m_nAttribute = 0;
}
CConfig1ppsPulseWidthDlg::~CConfig1ppsPulseWidthDlg()
{
}
void CConfig1ppsPulseWidthDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CConfig1ppsPulseWidthDlg, CDialog)
ON_BN_CLICKED(IDOK, &CConfig1ppsPulseWidthDlg::OnBnClickedOk)
END_MESSAGE_MAP()
// CConfig1ppsPulseWidthDlg
void CConfig1ppsPulseWidthDlg::OnBnClickedOk()
{
CString txt;
GetDlgItem(IDC_PULSE_WIDTH)->GetWindowText(txt);
m_nPulseWidth = atoi(txt);
if(m_nPulseWidth<1 || m_nPulseWidth>100000)
{
AfxMessageBox("Number of Pulse Width must be between 1 and 100000.");
return;
}
m_nAttribute = ((CComboBox*)GetDlgItem(IDC_BINARY_ATTRI))->GetCurSel();;
OnOK();
}
BOOL CConfig1ppsPulseWidthDlg::OnInitDialog()
{
CDialog::OnInitDialog();
GetDlgItem(IDC_PULSE_WIDTH)->SetWindowText("1");
((CComboBox*)GetDlgItem(IDC_BINARY_ATTRI))->SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。