ChatSvrDlg.h
上传用户:qzzxgm
上传日期:2009-12-14
资源大小:1882k
文件大小:2k
源码类别:

书籍源码

开发平台:

Visual C++

  1. // ChatSvrDlg.h : header file
  2. //
  3. #if !defined(AFX_CHATSVRDLG_H__758016D5_8715_11D6_8F32_00E04CE76240__INCLUDED_)
  4. #define AFX_CHATSVRDLG_H__758016D5_8715_11D6_8F32_00E04CE76240__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CChatSvrDlg dialog
  10. #define BUFFER_SIZE 200
  11. class CListeningSocket;
  12. class CClientSocket;
  13. class CChatSvrDlg : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CChatSvrDlg(CWnd* pParent = NULL); // standard constructor
  18. // Dialog Data
  19. //{{AFX_DATA(CChatSvrDlg)
  20. enum { IDD = IDD_CHATSVR_DIALOG };
  21. CListBox m_ctrlMsgs;
  22. //}}AFX_DATA
  23. // ClassWizard generated virtual function overrides
  24. //{{AFX_VIRTUAL(CChatSvrDlg)
  25. protected:
  26. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  27. //}}AFX_VIRTUAL
  28. // Implementation
  29. public:
  30. void ProcessPendingAccept();
  31. void ProcessPendingRead(CClientSocket* pSocket);
  32. void UpdateClients(char* buffer,int nBufferSize);
  33. protected:
  34. HICON m_hIcon;
  35. CListeningSocket* m_pSocket; //监听套节字
  36. CPtrList m_connectionList; //客户端套节字链表
  37. // Generated message map functions
  38. //{{AFX_MSG(CChatSvrDlg)
  39. virtual BOOL OnInitDialog();
  40. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  41. afx_msg void OnPaint();
  42. afx_msg HCURSOR OnQueryDragIcon();
  43. afx_msg void OnDestroy();
  44. //}}AFX_MSG
  45. DECLARE_MESSAGE_MAP()
  46. };
  47. //{{AFX_INSERT_LOCATION}}
  48. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  49. #endif // !defined(AFX_CHATSVRDLG_H__758016D5_8715_11D6_8F32_00E04CE76240__INCLUDED_)