📄 test.cpp
字号:
// Test.cpp : implementation file
//
#include "stdafx.h"
#include "CDMASMSS.h"
#include "Test.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTest dialog
#include "CDMASMSSDlg.h"
extern CCDMASMSSDlg * CDMASMSSDlg;
CTest::CTest(CWnd* pParent /*=NULL*/)
: CDialog(CTest::IDD, pParent)
{
//{{AFX_DATA_INIT(CTest)
m_send = _T("");
//}}AFX_DATA_INIT
}
void CTest::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTest)
DDX_Text(pDX, IDC_EDIT1, m_send);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTest, CDialog)
//{{AFX_MSG_MAP(CTest)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTest message handlers
void CTest::OnOK()
{
// TODO: Add extra validation here
UpdateData(true);
CString infor=m_send;
infor+="\r";
if(CDMASMSSDlg->m_bOpen==false) MessageBox("请打开串口!");
else
{
if(infor!="")
CDMASMSSDlg->SendAT(infor);
}
}
void CTest::OnButton1()
{
// TODO: Add your control notification handler code here
CString infor="AT*SKT*READMT=0";
m_send=infor;
infor+="\r";
if(CDMASMSSDlg->m_bOpen==false) MessageBox("请打开串口!");
else
{
CDMASMSSDlg->SendAT(infor);
UpdateData(false);
}
}
void CTest::OnButton2()
{
// TODO: Add your control notification handler code here
CString infor="AT*SKT*DELMT=0";
m_send=infor;
infor+="\r";
if(CDMASMSSDlg->m_bOpen==false) MessageBox("请打开串口!");
else
{
CDMASMSSDlg->SendAT(infor);
UpdateData(false);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -