文章作者 100test 发表时间 2007:09:29 13:51:49
来源 100Test.Com百考试题网
#if !defined(AFX_MSCOMM_H__) #define AFX_MSCOMM_H__ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C , your modifications will be overwritten. ///////////////////////////////////////////////////////////////////////////// // CMSComm wrapper class class CMSComm : public CWnd { protected: DECLARE_DYNCREATE(CMSComm) public: CLSID const&. GetClsid() { static CLSID const clsid = { 0x648a5600, 0x2c6e, 0x101b, { 0x82, 0xb6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x14 } }. return clsid. } virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT&. rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID). } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT&. rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey). } // Attributes public: // Operations public: void SetCDHolding(BOOL bNewValue). BOOL GetCDHolding(). void SetCommID(long nNewValue). long GetCommID(). void SetCommPort(short nNewValue). //设置端口号,如nNewValue =1表示COM1 short GetCommPort(). void SetCTSHolding(BOOL bNewValue). BOOL GetCTSHolding(). void SetDSRHolding(BOOL bNewValue). BOOL GetDSRHolding(). void SetDTREnable(BOOL bNewValue). BOOL GetDTREnable(). void SetHandshaking(long nNewValue). long GetHandshaking(). void SetInBufferSize(short nNewValue). short GetInBufferSize(). void SetInBufferCount(short nNewValue). short GetInBufferCount(). void SetBreak(BOOL bNewValue). BOOL GetBreak(). void SetInputLen(short nNewValue). short GetInputLen(). void SetNullDiscard(BOOL bNewValue). BOOL GetNullDiscard(). void SetOutBufferSize(short nNewValue). short GetOutBufferSize(). void SetOutBufferCount(short nNewValue). short GetOutBufferCount(). void SetParityReplace(LPCTSTR lpszNewValue). CString GetParityReplace(). void SetPortOpen(BOOL bNewValue). //打开或关闭串口,TRUE:打开,FALSE:关闭 BOOL GetPortOpen(). //串口是否已打开,TRUE:打开,FALSE:关闭 void SetRThreshold(short nNewValue). //如果设置为1,表示一接收到字符就发送2号事件 short GetRThreshold(). void SetRTSEnable(BOOL bNewValue). //硬件握手使能? BOOL GetRTSEnable(). void SetSettings(LPCTSTR lpszNewValue). //Settings由4部分组成,其格式为:"BBBB,P,D,S",即"波特率,是否奇偶校验,数据位 //个数,停止位",如设置为:"9600,n,8,1" CString GetSettings(). void SetSThreshold(short nNewValue). //如果保持缺省值0不变,则表示发送数据的过程中串口上不发生事件 short GetSThreshold(). void SetOutput(const VARIANT&. newValue). //一个非常重要的函数,用于写串口,注意其接收的输入参数为VARIANT类型对象, //我们需要将字符串转化为VARIANT类型对象 VARIANT GetOutput(). void SetInput(const VARIANT&. newValue). VARIANT GetInput(). //一个非常重要的函数,用于读串口,注意其返回的是VARIANT类型对象,我们需要 //将其转化为字符串 void SetCommEvent(short nNewValue). short GetCommEvent(). //一个非常重要的函数,获得串口上刚发生的事件("事件"可以理解为软件意义上的 //"消息"或硬件意义上的"中断"),事件的发送会导致OnComm消息的诞生! void SetEOFEnable(BOOL bNewValue). BOOL GetEOFEnable(). void SetInputMode(long nNewValue). long GetInputMode(). }. //{{AFX_INSERT_LOCATION}} // Microsoft Visual C will insert additional declarations immediately before the previous line. #endif |
相关文章
VC开发多语言界面支持的简单方法
VisualC 设计超强仿QQ自动伸缩窗口
VC6.0下配置boost库使用正则表达式
VisualC 开发工具与调试技巧整理
深入浅出VC 串口编程之基于控件
编程初学者练习编程(7)阶乘
编程初学者练习编程(6)凯撒密码机
编程初学者练习编程(5)矩阵乘法
编程初学者练习编程(4)双向冒泡
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛