⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serialtcpdlg.h

📁 串口转TCPIP 实用程序,很实用的代码和code,我们可以学习串口和tcp ip的原理
💻 H
字号:
// SerialTcpDlg.h : header file
//

#pragma once


// CSerialTcpDlg dialog
#include "Item.h"
#include "afxcmn.h"
#include "trayicon.h"
#include "resource.h"

#define  PORT_NUM     99

class CSerialTcpDlg : public CDialog
{
// Construction
public:
	CSerialTcpDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_SERIALTCP_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

public:
	//*********************************************************
	void ReadConfigFile();
	void RefreshList();
	void SetErrTimer(int ID);
	LRESULT OnCommunication(WPARAM ch, LPARAM port);
	LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);



	CItem* m_arrItem[PORT_NUM];		//对多个连接对CItem进行管理
	BOOL m_bFull;
	CString m_strErr;

	bool m_bVisible;

	CTrayIcon m_trayIcon;
	//************************************************************

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	CListCtrl m_lstView;
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
	afx_msg void OnTrayOpen();
	afx_msg void OnClose();
	afx_msg void OnTrayExit();
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -