Example2_ChatRoomDlg.h

Upload User: lidebao1
Upload Date: 2013-05-01
Package Size: 2437k
Code Size: 2k
Category: Windows Develop
Development Platform: Visual C++
  1. // Example2_ChatRoomDlg.h : header file
  2. //
  3. #if !defined(AFX_EXAMPLE2_CHATROOMDLG_H__A2D60D19_2558_4BA4_B3F3_642E537939EB__INCLUDED_)
  4. #define AFX_EXAMPLE2_CHATROOMDLG_H__A2D60D19_2558_4BA4_B3F3_642E537939EB__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CExample2_ChatRoomDlg dialog
  10. #include "ServerSocket.h"
  11. #include "ClientSocket.h"
  12. class CExample2_ChatRoomDlg : public CDialog
  13. {
  14. // Construction
  15. public:
  16. CExample2_ChatRoomDlg(CWnd* pParent = NULL); // standard constructor
  17. // Dialog Data
  18. //{{AFX_DATA(CExample2_ChatRoomDlg)
  19. enum { IDD = IDD_EXAMPLE2_CHATROOM_DIALOG };
  20. CString m_sInputString;
  21. CString m_sShowString;
  22. UINT m_uPort;
  23. //}}AFX_DATA
  24. public:
  25. void ProcessPendingAccept();
  26. void CloseSessionSocket();
  27. void ClearContent();
  28. void OnClearconnection();
  29. public:
  30. bool m_bInit;
  31. bool m_bClient;
  32. CClientSocket m_clientsocket;
  33. CServerSocket m_pListenSocket;
  34. CPtrList m_connectionList;
  35. CString m_sMsgList;
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CExample2_ChatRoomDlg)
  38. protected:
  39. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  40. //}}AFX_VIRTUAL
  41. // Implementation
  42. protected:
  43. HICON m_hIcon;
  44. // Generated message map functions
  45. //{{AFX_MSG(CExample2_ChatRoomDlg)
  46. virtual BOOL OnInitDialog();
  47. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  48. afx_msg void OnPaint();
  49. afx_msg HCURSOR OnQueryDragIcon();
  50. afx_msg void OnInputText();
  51. afx_msg void OnConnectserver();
  52. afx_msg void OnSetserver();
  53. //}}AFX_MSG
  54. DECLARE_MESSAGE_MAP()
  55. };
  56. //{{AFX_INSERT_LOCATION}}
  57. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  58. #endif // !defined(AFX_EXAMPLE2_CHATROOMDLG_H__A2D60D19_2558_4BA4_B3F3_642E537939EB__INCLUDED_)