setgb.cpp

来自「vc 485串口通讯测试程序 vc-commtest」· C++ 代码 · 共 62 行

CPP
62
字号
// SetGB.cpp : implementation file
//

#include "stdafx.h"
#include "CommTest.h"
#include "SetGB.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSetGB dialog


CSetGB::CSetGB(CWnd* pParent /*=NULL*/)
	: CDialog(CSetGB::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSetGB)
	m_address = _T("");
	//}}AFX_DATA_INIT
}


void CSetGB::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSetGB)
	DDX_Control(pDX, IDC_COMBO_METERCLASS, m_meterclass);
	DDX_Control(pDX, IDC_EDIT_ADDRESS, m_addr);
	DDX_Text(pDX, IDC_EDIT_ADDRESS, m_address);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSetGB, CDialog)
	//{{AFX_MSG_MAP(CSetGB)
	ON_BN_CLICKED(IDC_BUTTON_OK, OnButtonOk)
	ON_BN_CLICKED(IDC_BUTTON_CANCEL, OnButtonCancel)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSetGB message handlers

void CSetGB::OnButtonOk() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	MeterClass = m_meterclass.GetCurSel();
	OnOK();
}

void CSetGB::OnButtonCancel() 
{
	// TODO: Add your control notification handler code here
	UpdateData(FALSE);
	OnCancel();
}

⌨️ 快捷键说明

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