www.pudn.com > chat-dialog.rar > Sever1_2Dlg.h


// Sever1_2Dlg.h : header file 
// 
 
#if !defined(AFX_SEVER1_2DLG_H__B17F5C9E_F80E_471F_AD56_86A2ABAF6740__INCLUDED_) 
#define AFX_SEVER1_2DLG_H__B17F5C9E_F80E_471F_AD56_86A2ABAF6740__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "ListenSocket.h" 
#include "SeverSocket.h" 
#include "DlgIpPort.h" 
#include "SocketMsg.h" 
#include  
///////////////////////////////////////////////////////////////////////////// 
// CSever1_2Dlg dialog 
 
class CSever1_2Dlg : public CDialog 
{ 
// Construction 
public: 
	CSever1_2Dlg(CWnd* pParent = NULL);	// standard constructor 
 
// Dialog Data 
	//{{AFX_DATA(CSever1_2Dlg) 
	enum { IDD = IDD_SEVER1_2_DIALOG }; 
		// NOTE: the ClassWizard will add data members here 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CSever1_2Dlg) 
	public: 
	virtual BOOL DestroyWindow(); 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam); 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	// Generated message map functions 
	//{{AFX_MSG(CSever1_2Dlg) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	afx_msg void OnButtonStart(); 
	virtual void OnCancel(); 
	afx_msg void OnSavemsg(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
public: 
	CListenSocket m_socketListen; 
//	CString m_strMsg; 
private: 
	void DisDlgText(char*,int); 
	void DisDlgText(CString,int); 
	void CloseSocket(SOCKET s); 
	void SetNewSock(SOCKET s); 
	void SetNewClient(char*,int); 
	void CloseClient(char*,int); 
private: 
	BOOL m_bConnect; 
	CString m_strIP; 
	UINT m_nPort; 
	CString m_sFormatDlg; 
 
private: 
	void SendToAllClient(CString strSend,int nLen); 
	CString FormatStr(CSocketMsg*); 
	CString GetCurTime(); 
	void OnListChange(CString); 
 
private: 
	CStringList* m_pStringList; 
	CTime m_pOnLineTime[20]; 
	CImageList m_imageList; 
//	CString* m_strList[20]; 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_SEVER1_2DLG_H__B17F5C9E_F80E_471F_AD56_86A2ABAF6740__INCLUDED_)