使用C/C++在VC6下编写简单串口通信程序?

使用C/C++在VC6下编写简单串口通信程序


慕尼黑的夜晚无繁华
浏览 938回答 3
3回答

慕仙森

在主窗口里响应WM_CTLCOLOR消息.如果不行再HI我HBRUSH CEdDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor){HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);// TODO: Change any attributes of the DC hereif(IDC_EDIT1 == pWnd->GetDlgCtrlID() && nCtlColor == CTLCOLOR_EDIT){COLORREF clr = RGB(0,0,0);pDC->SetBkColor(clr);return ::CreateSolidBrush(clr);}// TODO: Return a different brush if the default is not desiredreturn hbr;}

MMTTMM

步骤:1、点击“文件”菜单按钮,选择“新建”;2、在“工程”选项中选择“Win32 Console Application”,然后输入工程名称;3、选旁边的“文件”的选项卡,然后选“C++Source File”,输入文件名(以.c结束例如: sort.c)按确定;4、在后缀为.c的文本编辑框内输入源代码;5、F7是编译,F5是运行,ctrl+F5是看结果 。
打开App,查看更多内容
随时随地看视频慕课网APP