www.pudn.com > ChatUseIOCP.rar > ChatClientDlg.h


// ChatClientDlg.h : header file 
// 
 
#pragma once 
#include "afxwin.h" 
 
#include "ChatClientSocket.h" 
 
// CChatClientDlg dialog 
class CChatClientDlg : public CDialog 
{ 
// Construction 
public: 
	CChatClientDlg(CWnd* pParent = NULL);	// standard constructor 
 
// Dialog Data 
	enum { IDD = IDD_CHATCLIENT_DIALOG }; 
 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
 
 
// Implementation 
protected: 
	HICON m_hIcon; 
	CChatSocket chat; 
 
	// Generated message map functions 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	DECLARE_MESSAGE_MAP() 
public: 
	CEdit m_edtLog; 
	CEdit m_edtChat; 
	CListBox m_lstUsers; 
	CButton m_btnSend; 
 
	CString m_strUsername; 
 
	afx_msg LRESULT OnChatConnect(WPARAM wp, LPARAM lp); 
	afx_msg LRESULT OnChatDisconnect(WPARAM wp, LPARAM lp); 
	afx_msg LRESULT OnChatTrans(WPARAM wp, LPARAM lp); 
 
	void AddMessage(char* szBuffer); 
	void ListUsers(char* szBuffer); 
 
	afx_msg void OnBnClickedButtonSend(); 
	afx_msg void OnDestroy(); 
};