串口
来源:互联网 发布:图像算法专业 编辑:程序博客网 时间:2024/05/17 03:52
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CSCOMMDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CSCOMMDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
static long rxdatacount=0; //该变量用于接收字符计数
LONG CSCOMMDlg::OnCommunication(WPARAM ch, LPARAM port)
{
if (port <= 0 || port > 4)
return -1;
rxdatacount++; //接收的字节计数
CString strTemp;
strTemp.Format("%ld",rxdatacount);
strTemp="RX:"+strTemp;
m_ctrlRXCOUNT.SetWindowText(strTemp); //显示接收计数
//如果选择了"十六进制显示",则显示十六进制值
CString str;
str.Format("%02X ",ch);
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- 串口
- mongodb 压力测试问题
- ZOJ-1875-Phone List-字典树
- 程序中调用QQ程序,实现QQ客服。
- 24点之5 7 7 11
- USTC Monthly Contest 2011-04-10 / 解题报告
- 串口
- 《深入浅出WPF》-刘铁猛-读书笔记
- JAVA编写31条建议
- linux schedule
- 湖南省赛6--第2题 弟弟的作业 字符串处理
- ./runInstaller: line 50: [: too many arguments
- Process terminated with status -1073741510
- tomcat6常用管理知识
- Tomcat应用部署的常见方式和问题