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

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   KeyMappingDlg.h
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Module description: Interface of the Key Mapping 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_KEYMAPPINGDLG_H__77E8DF4F_E5D5_11D1_AA8A_444553540000__INCLUDED_)
  21. #define AFX_KEYMAPPINGDLG_H__77E8DF4F_E5D5_11D1_AA8A_444553540000__INCLUDED_
  22. #if _MSC_VER >= 1000
  23. #pragma once
  24. #endif // _MSC_VER >= 1000
  25. // KeyMappingDlg.h : header file
  26. //
  27. #include "MyEdit.h"     // Defines CMyEdit
  28. #include "KeysTable.h"
  29. #include "resource.h"
  30. #include <AniButton.h>
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CKeyMappingDlg dialog
  33. class CKeyMappingDlg : public CDialog
  34. {
  35. // Construction
  36. public:
  37. CKeyMappingDlg(CKeysTable* pKeys, CWnd* pParent = NULL); // Constructor
  38. //    BOOL SetCEditString(int);   // Return true if focus is on an Edit control
  39. // Dialog Data
  40. //{{AFX_DATA(CKeyMappingDlg)
  41. enum { IDD = IDD_KEYMAPPING_DIALOG };
  42. CAniButton m_ctrOK;
  43.     CAniButton  m_ctrCancel;
  44.     CAniButton  m_ctrDefault;
  45. CMyEdit m_Right;
  46. CMyEdit m_Left;
  47. CMyEdit m_Shell;
  48. CMyEdit m_Bullet;
  49. CMyEdit m_Mine;
  50. CMyEdit m_Backward;
  51. CMyEdit m_Aerial;
  52. CMyEdit m_Forward;
  53. //}}AFX_DATA
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(CKeyMappingDlg)
  56. protected:
  57. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  58. //}}AFX_VIRTUAL
  59. // Implementation
  60. protected:
  61. HICON m_hIcon;
  62.     CKeysTable* m_pKeys;  // Pointer to a copy of keys settings
  63. //    BOOL KeyToString (int iKey, CString& cstr);
  64.     void UpdateAllCEdit();
  65. // Generated message map functions
  66. //{{AFX_MSG(CKeyMappingDlg)
  67. virtual BOOL OnInitDialog();
  68. virtual void OnOK();
  69. afx_msg void OnButtonDefaultSettings();
  70. afx_msg void OnSetfocusEditAerialSupport();
  71. afx_msg void OnSetfocusEditBackward();
  72. afx_msg void OnSetfocusEditDropMine();
  73. afx_msg void OnSetfocusEditFireBullet();
  74. afx_msg void OnSetfocusEditFireShell();
  75. afx_msg void OnSetfocusEditForward();
  76. afx_msg void OnSetfocusEditTurnLeft();
  77. afx_msg void OnSetfocusEditTurnRight();
  78. //}}AFX_MSG
  79. DECLARE_MESSAGE_MAP()
  80. };
  81. //{{AFX_INSERT_LOCATION}}
  82. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  83. #endif // !defined(AFX_KEYMAPPINGDLG_H__77E8DF4F_E5D5_11D1_AA8A_444553540000__INCLUDED_)