
BETA903A USER MANUAL
- 69 -
{
tmp.Format(_T("%c"), *buf);
m_strR= tmp;
}
pRecvStrEdit->SetWindowText(m_strRecDisp); /* Show */
return 0;
}
// Initial user interface
const CString PorTbl[4] = {_T("COM1:"),_T("COM3:"),_T("COM4:"),_T("COM6:")};
const DWORD BaudTbl[6] = {4800, 9600, 19200, 38400, 57600,115200};
const DWORD DataBitTbl[2] = {7, 8};
const BYTE StopBitTbl[3] = {ONESTOPBIT, ONE5STOPBITS, TWOSTOPBITS};
const BYTE ParityTbl[4] = {NOPARITY, ODDPARITY, EVENPARITY, MARKPARITY};
/*******************************************************************************************
Function for “OPEN” button used to open selected serial port.
********************************************************************************************/
void CSerialPortDlg::OnOpenCom()
{
UpdateData(TRUE);
CString strPort = PorTbl[m_ComboPort.GetCurSel()];
DWORD baud = BaudTbl[m_ComboBaud.GetCurSel()];
DWORD databit = DataBitTbl[m_ComboData.GetCurSel()];
BYTE stopbit = StopBitTbl[m_ComboStop.GetCurSel()];
BYTE parity = ParityTbl[m_ComboParity.GetCurSel()];
BOOL ret = m_pSerialPort->Open(strPort, baud, databit, stopbit, parity);
if (ret == FALSE)
Open selected serial port by
specified parameter values.
{
MessageBox(_T("Open ") + s _T(" Fail!"));
return;
}
m_ButOpen.EnableWindow(FALSE); /* Disable "open" button */
m_ButClose.EnableWindow(TRUE); /* Enable "close" button */
MessageBox(_T("Open ") + s _T(" is OK!"));
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 ...