ServerMgmtDlg.h
上传用户:royluo
上传日期:2007-01-05
资源大小:1584k
文件大小:3k
源码类别:

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   ServerMgmtDlg.h
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Module description: Implements the server management dialog.
  11. *                       
  12. *                                                                             
  13. *   Authors: Eran Yariv - 28484475                                           
  14. *            Moshe Zur  - 24070856                                           
  15. *                                                                            
  16. *                                                                            
  17. *   Date: 23/09/98                                                           
  18. *                                                                            
  19. ******************************************************************************/
  20. #if !defined(AFX_SERVERMGMTDLG_H__0F2E7C42_49A2_11D2_8865_B232F056F5C3__INCLUDED_)
  21. #define AFX_SERVERMGMTDLG_H__0F2E7C42_49A2_11D2_8865_B232F056F5C3__INCLUDED_
  22. #if _MSC_VER >= 1000
  23. #pragma once
  24. #endif // _MSC_VER >= 1000
  25. // servermgmtdlg.h : header file
  26. //
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CServerMgmtDlg dialog
  29. class CServerMgmtDlg : public CDialog
  30. {
  31. // Construction
  32. public:
  33. CServerMgmtDlg(CWnd* pParent = NULL);   // standard constructor
  34.     ~CServerMgmtDlg () {}
  35.     static void Open (CWnd *pParent);
  36.     void PostNcDestroy( );
  37.     void OnCancel ();
  38. // Dialog Data
  39. //{{AFX_DATA(CServerMgmtDlg)
  40. enum { IDD = IDD_SERVER_MGMT };
  41. CListCtrl m_PlayersList;
  42. //}}AFX_DATA
  43. // Overrides
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CServerMgmtDlg)
  46. protected:
  47. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  48. //}}AFX_VIRTUAL
  49. // Implementation
  50. protected:
  51. // Generated message map functions
  52. //{{AFX_MSG(CServerMgmtDlg)
  53. afx_msg void OnDisconnectPlayer();
  54. afx_msg void OnClose();
  55. virtual BOOL OnInitDialog();
  56. afx_msg void OnTimer(UINT nIDEvent);
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. private:
  60. int         GetCurSelection ();
  61. void        RefreshList ();
  62.     static void Close ();
  63.     int         FindPlayerIndex (UINT);
  64.     void        RemoveNonExistantPlayers (PBOOL pbPlayers);
  65.     void        UpdateOrAddPlayersData (PBOOL pbPlayers);
  66.     CImageList      m_ImgList;
  67.     CCommManager   &m_gCommManager;
  68.     int             m_ImgIndex[MAX_TANKS];
  69.     static CServerMgmtDlg *m_pDlg;
  70. };
  71. //{{AFX_INSERT_LOCATION}}
  72. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  73. #endif // !defined(AFX_SERVERMGMTDLG_H__0F2E7C42_49A2_11D2_8865_B232F056F5C3__INCLUDED_)