📄 wavecommctl.h
字号:
#if !defined(AFX_WAVECOMMCTL_H__E3AA05CA_322A_4DE9_9F41_DDEEFD54C21B__INCLUDED_)
#define AFX_WAVECOMMCTL_H__E3AA05CA_322A_4DE9_9F41_DDEEFD54C21B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// WaveCommCtl.h : Declaration of the CWaveCommCtrl ActiveX Control class.
/////////////////////////////////////////////////////////////////////////////
// CWaveCommCtrl : See WaveCommCtl.cpp for implementation.
class CMyComm;
class CWaveCommCtrl : public COleControl
{
DECLARE_DYNCREATE(CWaveCommCtrl)
// Constructor
public:
CWaveCommCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CWaveCommCtrl)
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
//}}AFX_VIRTUAL
// Implementation
protected:
~CWaveCommCtrl();
DECLARE_OLECREATE_EX(CWaveCommCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CWaveCommCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CWaveCommCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CWaveCommCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CWaveCommCtrl)
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CWaveCommCtrl)
afx_msg void SendSMS(LPCTSTR Mobile, LPCTSTR SMS);
afx_msg void Open(long port);
afx_msg void SiYuanCommand(LPCTSTR tel,long index, LPCTSTR param1, LPCTSTR param2);
afx_msg void SiYuanBound(LPCTSTR tel,double minx, double miny, double maxx, double maxy);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
afx_msg void AboutBox();
// Event maps
//{{AFX_EVENT(CWaveCommCtrl)
void FireGpsData(LPCTSTR id, LPCTSTR gsmtime, LPCTSTR gpsdata)
{FireEvent(eventidGpsData,EVENT_PARAM(VTS_BSTR VTS_BSTR VTS_BSTR), id, gsmtime, gpsdata);}
void FireOnSMSindex(long index)
{FireEvent(eventidOnSMSindex,EVENT_PARAM(VTS_I4), index);}
void FireSiYuanGpsData(long PosType, LPCTSTR Tel, double x, double y, double speed, LPCTSTR time, LPCTSTR alarm, long Isvalid, long fangxiang)
{FireEvent(eventidSiYuanGpsData,EVENT_PARAM(VTS_I4 VTS_BSTR VTS_R8 VTS_R8 VTS_R8 VTS_BSTR VTS_BSTR VTS_I4 VTS_I4), PosType, Tel, x, y, speed, time, alarm, Isvalid, fangxiang);}
void FireSiYuanEvent(long Command_Index, LPCTSTR param1, LPCTSTR param2, LPCTSTR param3)
{FireEvent(eventidSiYuanEvent,EVENT_PARAM(VTS_I4 VTS_BSTR VTS_BSTR VTS_BSTR), Command_Index, param1, param2, param3);}
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
BOOL IsOpen;
void SendLast();
void SendNext();
void SendRepeat();
void DeleteAllSMS();
CPtrArray m_rSendCommDataArray;
int m_SentPassedTime;
BYTE CharToHex(char c);
void SiYuanGPS(long type,CString id,CString GPS);
void SetTextMode();
void DeleteSMS(int index);
CString m_SMS;
CString cmgf;
BOOL IsSending;
int m_index,m_RepeatTimes;
void SendMessage(CString message);
void RequestSendSMS(CString mobile);
void RequestReadSMS(int index);
void ProcessCommData(BYTE *lpString, DWORD dwSize);
void CommResult(int sign);
CMyComm* pComm;
enum {
//{{AFX_DISP_ID(CWaveCommCtrl)
dispidSendSMS = 1L,
dispidOpen = 2L,
dispidSiYuanCommand = 3L,
dispidSiYuanBound = 4L,
eventidGpsData = 1L,
eventidOnSMSindex = 2L,
eventidSiYuanGpsData = 3L,
eventidSiYuanEvent = 4L,
//}}AFX_DISP_ID
};
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WAVECOMMCTL_H__E3AA05CA_322A_4DE9_9F41_DDEEFD54C21B__INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -