C++串口工具源码
串口工具收发,代码简单明了,适合初学者,vs void CSerialTestDlg::OnBnClickedButton1() { // TODO: Add your control notification handler code here CString str,strCOM,strBaud; int com,baud; GetDlgItemText(IDC_BUTTON1,str); // GetDlgItemText(IDC_COMBO_COM,strCOM); com=m_cmb_com.GetCurSel()+1; GetDlgItemText(IDC_COMBO_BAUD,strBaud); baud = _ttoi(strBaud); if(str==_T("打开串口")) { if(m_Serial.OpenPort(this->m_hWnd,com,baud)) { m_Serial.m_OnSeriesRead = m_OnSeriesRead; //设置回调函数接口 SetDlgItemText(IDC_BUTTON1,_T("关闭串口&quo t;)); } } else if(str==_T("关闭串口")) { m_Serial.ClosePort(); SetDlgItemText(IDC_BUTTON1,_T("打开串口")); } }
文件列表
SerialTest(PC_重叠IO).rar
(预估有个25文件)
SerialTest(PC_重叠IO)
SerialTest
stdafx.cpp
210B
SerialTest.rc
5KB
Serial.h
2KB
SerialTest.vcproj.JWD-CYZ.JWD_CYZ.user
1KB
res
SerialTest.ico
21KB
SerialTest.rc2
401B
stdafx.h
3KB
用户评论