回复 5楼 yuccn
void CAllGetComDlg::OnBtSend1()
{
// TODO: Add your control notification handler code here
unsigned char buf[] = { 0x40, 0x40, 0x00, 0x00, 0x04, 0x01, 0x07, 0xff, 0xff, 0x00, 0x00, 0x0a, 0x23, 0x23};
DWORD dwBufferLength = 1024;
if(mCom1.IsOpen())
{
//mCom1.GetInputSize();
mCom1.SetBufferSize(BUF_IN_SIZE, BUF_OUT_SIZE);
mCom1.Write(buf,dwBufferLength);
GetDlgItem(IDC_EDIT1)->SetWindowText((const char *)buf);
}
else
::AfxMessageBox("ComPotr isn't open, send fail");
}
我输入的是16进制 怎样才能输出16进制? 程序我放在附件吧 如果大哥有空帮我看看