
BETA903A USER MANUAL
- 70 -
}
/*******************************************************************************************
Function for “CLOSE” button used to close current serial port.
********************************************************************************************/
void CSerialPortDlg::OnCloseCom()
{
m_pSerialPort->Close();
m_ButOpen.EnableWindow(TRUE); /* Enable "Open" button */
m_ButClose.EnableWindow(FALSE); /* Disable "close" button */
}
/*******************************************************************************************
Function for “SEND” button used to send data by serial port.
********************************************************************************************/
void CSerialPortDlg::OnSend()
{
UpdateData(TRUE);
int len = m_strSendEdit.GetLength();
for(int i = 0; i < len;i++)
m_cSendBuffer[i] = (char)m_strSendEdit.GetAt(i);;
BOOL status = m_pSerialPort->Send(m_cSendBuffer, len);
if (!status)
MessageBox(_T("Can't write string to COM"),_T("Error"),MB_OK);
}
/*******************************************************************************************
Destory function of serial port test dialog
********************************************************************************************/
void CSerialPortDlg::OnDestroy()
{
CDialog::OnDestroy();
m_pSerialPort->Close();
delete m_pSerialPort;
Close current serial port.
Send data by current serial port.
Close current serial port and
delete CSerialPort object.
delete m_cSendBuffer;
}
Summary of Contents for BETA903A
Page 19: ...BETA903A USER MANUAL 19 1 3 2 Mechanical specifications of Holder Mount ...
Page 49: ...BETA903A USER MANUAL 49 STEP2 Select Windows folder STEP3 Run KeyPadTest program ...
Page 55: ...BETA903A USER MANUAL 55 5 Select No and click Next button to cancel the synchronization ...
Page 60: ...BETA903A USER MANUAL 60 STEP 5 Click Next button STEP 6 Click Next button ...
Page 94: ...BETA903A USER MANUAL 94 STEP 3 Add process code into message processing function ...
Page 95: ...BETA903A USER MANUAL 95 End of BETA903A User Manual ...