📄 comtoweb.h
字号:
// ComToWeb.h : main header file for the COMTOWEB application
//
#if !defined(AFX_COMTOWEB_H__FFE02451_7B73_48F8_AF97_C206F7EAB843__INCLUDED_)
#define AFX_COMTOWEB_H__FFE02451_7B73_48F8_AF97_C206F7EAB843__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "SerialPort.h"
#include "ClientSocket.h"
/////////////////////////////////////////////////////////////////////////////
// CComToWebApp:
// See ComToWeb.cpp for the implementation of this class
//
#define PACKET_HEAD_LENGTH 5;
//数据格式:0XAA0XAA 0X01 0XEE0XEE
#define WM_START_COMM_THREAD WM_USER + 100
#define WM_RECONNECT WM_USER + 101
class CComToWebApp : public CWinApp
{
public:
CComToWebApp();
public:
//parameter of the serial port
UINT m_nBaud;
char m_nParity;
UINT m_nDatabits;
UINT m_nWriteBufferSize;
UINT m_nReadBUfferSize;
UINT m_nStopBit;
UINT m_nPort;
//parameter of SOCKET
CString m_sSeverAddr;
UINT m_nSeverPort;
BOOL m_bConnected;
BOOL m_bComFound;
static const CString SETTINGPATH;
static const CString OPTIONFILE;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CComToWebApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CComToWebApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
BOOL FindChildDirectory(LPCTSTR lpszParaentDir, LPCTSTR lpscChildDir);
BOOL FindFileInDirectory(LPCTSTR lpszFileName, LPCTSTR lpszDirectory, const BOOL& bDelete);
extern CComToWebApp pApp;
char* AfxGetHostIP(void);
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_COMTOWEB_H__FFE02451_7B73_48F8_AF97_C206F7EAB843__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -