首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 上位机软件动态获取计算机COM口

上位机软件动态获取计算机COM口

资 源 简 介

应用背景 通过MFC6.0生成一个单文档程序,然后新建一个对话框并生成一个新类;在对话框中添加两个组合框控件。在生成的新类上右击增加windows消息WM_INITDIALOG生成处理函数,函数内容见“关键技术描述”。函数体中的index和baud均为int型,可设为全局变量。 关键技术BOOL CComDlg::OnInitDialog()  { CDialog::OnInitDialog(); ((CComboBox *)GetDlgItem(IDC_COMBO2))->AddString("4800"); ((CComboBox *)GetDlgItem(IDC_COMBO2))->AddString("9600"); ((CComboBox *)GetDlgItem(IDC_COMBO2))->AddString("38400"); ((CComboBox *)GetDlgItem(IDC_COMBO2))->AddString("115200"); ((CComboBox *)GetDlgItem(IDC_COMBO2))->SetCurSel(0+baud); long lReg;   HKEY hKey;   DWORD MaxValueLength;

文 件 列 表

test
res
Debug
Com.cpp
Com.h
MainFrm.cpp
MainFrm.h
ReadMe.txt
resource.h
StdAfx.cpp
StdAfx.h
test.aps
test.clw
test.cpp
test.dsp
test.dsw
test.h
test.ncb
test.opt
test.plg
test.rc
testDoc.cpp
testDoc.h
testView.cpp
testView.h
VIP VIP
0.176622s