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

📄 multicastdlg.h

📁 面向软件工程的Visual C++网络程序开发
💻 H
字号:
#if !defined(AFX_MULTICASTDLG1_H__3EA2651E_C105_4AE7_A5BA_C97A9C98D144__INCLUDED_)
#define AFX_MULTICASTDLG1_H__3EA2651E_C105_4AE7_A5BA_C97A9C98D144__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "StdAfx.h"

/////////////////////////////////////////////////////////////////////////////
// CMulticastDlg dialog

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

// Dialog Data
	//{{AFX_DATA(CMulticastDlg)
	enum { IDD = IDD_MULTICAST_DIALOG };
	CString	m_strMessage;
	//}}AFX_DATA

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

// Implementation
protected:
	CEdit		m_ctlMessage; // 文本框
	CComboBox	m_ctlWord;	// 当前编辑的文本
	CString		m_strAddress;	// 组播地址
	CString		m_strName;	// 成员名称
	UINT		m_uPort;	// 端口地址
	BOOL		m_bConnect;	// 连接状态
	SOCKET		m_hSocket;	// 通讯套接字
	SOCKET		m_hGroupSocket;	// 组套接字
	SOCKADDR_IN	m_addrRemote; // 组播地址结构
protected:
	HICON m_hIcon;

	virtual void OnOK();
	BOOL SendText(CString& strMsg);
	void ReceiveText();
	void AppendMessage(CString& strMsg);
	void JoinGroup();
	// Generated message map functions
	//{{AFX_MSG(CMulticastDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnOptions();
	afx_msg void OnUpdateOptions(CCmdUI* pUI);
	afx_msg void OnExit();
	afx_msg void OnSendMessage();
	afx_msg void OnDisconnet();
	afx_msg void OnUpdateDisconnect(CCmdUI* pUI);
	afx_msg void OnJoinGroup();
	afx_msg void OnUpdateJoinGroup(CCmdUI* pUI);
	afx_msg LONG OnNetworkEvent(WPARAM wParam, LPARAM lParam);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_MULTICASTDLG1_H__3EA2651E_C105_4AE7_A5BA_C97A9C98D144__INCLUDED_)

⌨️ 快捷键说明

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