tags:

views:

162

answers:

2

In Vc++ 6.0 mscomm control,please any body explain this function How it works ,what it does

if (m_comm.GetCommEvent()==2 ) 
     { 
      VARIANT in_dat;
      in_dat = m_comm.GetInput();
      CString strInput(in_dat.bstrVal);
      m_input = m_input + strInput;
      UpdateData(FALSE); 
     }
A: 

The code checks whether a comm event occured. If it did, then the input data is obtained from the control and appended to m_input. Afterwards, the data is updated.

The code does not offer much more insight.

HS
A: 

Just in case you don't know, "the data is updated" in HS' post means 'the dialog box fields are updated to show the new data'

Will Dean