我有两段代码不懂,能不能帮帮我,马上就要答辩了,谢谢了!
oid CGSMDlg::OnButton7() //文件发送{
CString strLine;
CStdioFile file;
file.Open("a.txt", CFile::modeRead);
file.ReadString(strLine);
UpdateData(TRUE);
CString temp,temp1;
COleVariant temp3;
char temp2[128];
receivestr="";
readshortletter =false;
sendphone=m_phonenumber;
senddatastr=strLine;
sendsca=m_sendsca;
UpdateData(FALSE);
temp3=m_ctrlComm.GetInput();
if(pduorder)
{
strunicode=getunicode(senddatastr);
temp="AT+CMGS=";
temp1=itoa(txtletterlen,temp2,10);//整型转换成字符型
temp=temp+temp1;
m_strreceivecmd=temp;
UpdateData(FALSE);
m_ctrlComm.SetOutput(COleVariant(temp+"\r"));//发送数据
sendstr=temp;
}
else
{
m_ctrlComm.SetOutput(COleVariant("AT+CMGS="+sendphone+"\r"));//发送数据
sendstr="AT+CMGS="+sendphone+"\r";
}
viewsendword();
file.Close();
}
void CGSMDlg::OnButton8() //文件接收
{
UpdateData(TRUE);
readshortletter=true;
receivestr="";
if(m_rno=="" || m_rno=="0")
{
MessageBox("您要读的短信位置为空或0!", "请重新输入短信位置");
m_ctrlno.SetFocus();//EDIT1得到焦点
m_rno="";
UpdateData(FALSE);
最好能帮我在每一句后面标上注释,谢谢了,
UpdateData(TRUE);最重要了,是什么意思啊?