#if!defined (afx_mscomm_h__) #define Afx_mscomm_h__#if _msc_ver > #pragma once #endif//_msc_ver >//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 would be overwritten.
CMSComm wrapper class
Class Cmscomm:public CWnd {protected:declare_dyncreate (cmscomm) public:clsid const& getclsid () {static CLSI D 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, rec T, 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, re CT, 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); Set the port number, such as Nnewvalue =1 represents 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); Turn the serial port on or off, TRUE: On, FALSE: Turn off BOOL getportopen (); The serial port is open, TRUE: On, FALSE: Close void Setrthreshold (short nnewvalue); If set to 1, indicates that a character is received to send the number 2nd event short getrthreshold (); void Setrtsenable (BOOL bnewvalue); Hardware handshake enabled? BOOL getrtsenable (); void Setsettings (LPCTSTR lpsznewvalue); Settings is composed of 4 parts, the format is: "Bbbb,p,d,s", that is, "baud rate, whether parity check, data bits//number, stop bit", such as set to: "9600,n,8,1" CString getsettings (); void Setsthreshold (short nnewvalue); //if the default value of 0 is not changed, then the process of sending data does not occur on the serial port event short getsthreshold (); void Setoutput (const variant& newvalue); A very important function for writing the serial port, note that the input parameters it receives are variant type objects, //We need to convert the string to a Variant type Object VARIANT GetOutput (); void SetInput (const variant& newvalue); VARIANT GetInput (); A very important function for reading the serial port, note that it returns a Variant type Object, we need//convert it to a string void Setcommevent (short nnewvalue); Short getcommevent (); A very important function, to get the event that just happened on the serial port ("event" can be understood as the software sense of//"message" or the hardware sense of "interrupt"), the sending of the event will lead to the birth of OnComm message! void Seteofenable (BOOL bnewvalue); BOOL geteofenable (); void Setinputmode (long nnewvalue); Long Getinputmode (); };
//{{afx_insert_location}}//Microsoft Visual C + + would INSERT additional declarations immediately before the Previou S line. #endif |