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

📄 mymaindlg.h

📁 两台PC电脑间数据的通讯,这是主发送端的VC源码
💻 H
字号:
// mymainDlg.h : header file
//

#if !defined(AFX_MYMAINDLG_H__D9508E46_3D30_11D9_952A_8C1C7F600163__INCLUDED_)
#define AFX_MYMAINDLG_H__D9508E46_3D30_11D9_952A_8C1C7F600163__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MemoryRW.h"
#include <Afxtempl.h>
#include "SystemTray.h"

/////////////////////////////////////////////////////////////////////////////
// CMymainDlg dialog
#define MAXBUFFERSIZE 10000
typedef struct{
	int number;
	char NAME[100];
	long ADDRESSFROM;
	long ADDRESSTO;
	int  select;
}MEASURE;
class CMymainDlg : public CDialog
{
// Construction
public:
	CMymainDlg(CWnd* pParent = NULL);	// standard constructor
    ~CMymainDlg();
	CMemoryRW m_ReadData;
	CSystemTray m_TrayIcon;
	int RecordMax;
    MEASURE measure;
	CArray<MEASURE,MEASURE> arrayMaster;
// Dialog Data
	//{{AFX_DATA(CMymainDlg)
	enum { IDD = IDD_MYMAIN_DIALOG };
	CListCtrl	m_list;
	CEdit	m_edit;
	CButton	m_button;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMymainDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMymainDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnButton1();
	afx_msg void OnButtonQuit();
	afx_msg void OnButton2();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnMenushow();
	afx_msg void OnAppExit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	int sin_port;
	int select;
	void ReadConfig();
	void GetaAddressTable();
	char m_slash[4];
	CString m_message;
	long m_number;
	UINT m_Timer;
	UINT m_TimerHide;
	void SentMemoryData();
	void SentCharBuff();
	void GetLonWorkData();
	void sendtoall(SOCKET s,char *buff);
	int  getcount();
	SOCKET sock,msgsock[50],clisock;
	int addlen;
	sockaddr_in serv;
	int count;
//	int getcount();
//	void sendtoall(SOCKET,char*);

};
UINT thread(LPVOID);

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYMAINDLG_H__D9508E46_3D30_11D9_952A_8C1C7F600163__INCLUDED_)

⌨️ 快捷键说明

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