下面是产生一个类的过程,然后怎么用控件里面的消息呢? 使用ActiveX控件: VC++ 6.0提供的MSComm控件通过串行端口发送和接收数据,为应用程序提供串行通信功能。使用非常方便,但可惜的是,很少有介绍MSComm控件的资料。   ⑴.在当前的Workspace中插入MSComm控件。    Project菜单------>Add to Project---->Components and Controls----->Registered    ActiveX Controls--->选择Components: Microsoft Communications Control,    version 6.0 插入到当前的Workspace中。 结果添加了类CMSComm(及相应文件:mscomm.h和mscomm.cpp )。   ⑵.在MainFrm.h中加入MSComm控件。 protected:    CMSComm m_ComPort;