DlgSetMvp.cpp
上传用户:tianheyiqi
上传日期:2010-04-16
资源大小:282k
文件大小:6k
源码类别:

外挂编程

开发平台:

Visual C++

  1. // DlgSetMvp.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "roa.h"
  5. #include "DlgSetMvp.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CDlgSetMvp property page
  13. IMPLEMENT_DYNCREATE(CDlgSetMvp, CPropertyPage)
  14. CDlgSetMvp::CDlgSetMvp() : CPropertyPage(CDlgSetMvp::IDD)
  15. {
  16. //{{AFX_DATA_INIT(CDlgSetMvp)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. CDlgSetMvp::~CDlgSetMvp()
  21. {
  22. }
  23. void CDlgSetMvp::DoDataExchange(CDataExchange* pDX)
  24. {
  25. CPropertyPage::DoDataExchange(pDX);
  26. //{{AFX_DATA_MAP(CDlgSetMvp)
  27. // NOTE: the ClassWizard will add DDX and DDV calls here
  28. //}}AFX_DATA_MAP
  29. DDX_Check(pDX, IDC_CHK_MVP_HP, m_settingmvp.autoheal.bHP);
  30. DDX_Text(pDX, IDC_EDT_MVP_HP1L, m_settingmvp.autoheal.nHP1Lower);
  31. DDX_Text(pDX, IDC_EDT_MVP_HP1H, m_settingmvp.autoheal.nHP1Upper);
  32. DDX_CBString(pDX, IDC_CMB_MVP_HPITEM, m_settingmvp.autoheal.strHP1Item);
  33. DDX_Text(pDX, IDC_EDT_MVP_HP2L, m_settingmvp.autoheal.nHP2Lower);
  34. DDX_Text(pDX, IDC_EDT_MVP_HP2H, m_settingmvp.autoheal.nHP2Upper);
  35. GetDlgItem(IDC_EDT_MVP_HP1L)->EnableWindow(m_settingmvp.autoheal.bHP);
  36. GetDlgItem(IDC_EDT_MVP_HP1H)->EnableWindow(m_settingmvp.autoheal.bHP);
  37. GetDlgItem(IDC_CMB_MVP_HPITEM)->EnableWindow(m_settingmvp.autoheal.bHP);
  38. GetDlgItem(IDC_EDT_MVP_HP2L)->EnableWindow(m_settingmvp.autoheal.bHP);
  39. GetDlgItem(IDC_EDT_MVP_HP2H)->EnableWindow(m_settingmvp.autoheal.bHP);
  40. DDX_Check(pDX, IDC_CHK_MVP_SP, m_settingmvp.autoheal.bSP);
  41. DDX_Text(pDX, IDC_EDT_MVP_SPH, m_settingmvp.autoheal.nSPUpper);
  42. DDX_CBString(pDX, IDC_CMB_MVP_SPITEM, m_settingmvp.autoheal.strSPItem);
  43. GetDlgItem(IDC_EDT_MVP_SPH)->EnableWindow(m_settingmvp.autoheal.bSP);
  44. GetDlgItem(IDC_CMB_MVP_SPITEM)->EnableWindow(m_settingmvp.autoheal.bSP);
  45. DDX_Check(pDX, IDC_CHK_MVP_HPTELE, m_settingmvp.autoheal.bHPTele);
  46. DDX_Text(pDX, IDC_EDT_MVP_HPTL, m_settingmvp.autoheal.nHPTeleUpper);
  47. GetDlgItem(IDC_EDT_MVP_HPTL)->EnableWindow(m_settingmvp.autoheal.bHPTele);
  48. DDX_Check(pDX, IDC_CHK_MVP_AUTOATTACK, m_settingmvp.bAttack);
  49. DDX_CBString(pDX, IDC_CMB_MVP_ATTACKSKILL, m_settingmvp.strAttackSkill);
  50. GetDlgItem(IDC_CMB_MVP_ATTACKSKILL)->EnableWindow(m_settingmvp.bAttack);
  51. DDX_Check(pDX, IDC_CHK_MVP_FOLLOW, m_settingmvp.bFollow);
  52. DDX_Check(pDX, IDC_CHK_MVP_REGIONATTACK, m_settingmvp.bRegionAtk);
  53. DDX_CBString(pDX, IDC_CMB_MVP_REGIONSKILL, m_settingmvp.strRegionAtkSkill);
  54. DDX_Text(pDX, IDC_EDT_MVP_MONNUMBER, m_settingmvp.nRegionAtkNum);
  55. GetDlgItem(IDC_CMB_MVP_REGIONSKILL)->EnableWindow(m_settingmvp.bRegionAtk);
  56. GetDlgItem(IDC_EDT_MVP_MONNUMBER)->EnableWindow(m_settingmvp.bRegionAtk);
  57. GetDlgItem(IDC_SPN_MVP_MONNUMBER)->EnableWindow(m_settingmvp.bRegionAtk);
  58. DDX_Check(pDX, IDC_CHK_MVP_ATTACK2, m_settingmvp.bAttack2);
  59. DDX_CBString(pDX, IDC_CMB_MVP_ATTACK2_COND, m_settingmvp.strAttack2Cond);
  60. DDX_CBString(pDX, IDC_CMB_MVP_ATTACK2SKILL, m_settingmvp.strAttack2Skill);
  61. GetDlgItem(IDC_CMB_MVP_ATTACK2_COND)->EnableWindow(m_settingmvp.bAttack2);
  62. GetDlgItem(IDC_CMB_MVP_ATTACK2SKILL)->EnableWindow(m_settingmvp.bAttack2);
  63. DDX_Check(pDX, IDC_CHK_MVP_PROTECT, m_settingmvp.bProtect);
  64. DDX_CBString(pDX, IDC_EDT_MVP_PROTECTSKILL, m_settingmvp.strProtectSkill);
  65. GetDlgItem(IDC_EDT_MVP_PROTECTSKILL)->EnableWindow(m_settingmvp.bProtect);
  66. DDX_Check(pDX, IDC_CHK_MVP_ANTIBLESS, m_settingmvp.bAntiBless);
  67. }
  68. BEGIN_MESSAGE_MAP(CDlgSetMvp, CPropertyPage)
  69. //{{AFX_MSG_MAP(CDlgSetMvp)
  70. ON_BN_CLICKED(IDC_CHK_MVP_HP, OnChkMvpHp)
  71. ON_BN_CLICKED(IDC_CHK_MVP_SP, OnChkMvpSp)
  72. ON_BN_CLICKED(IDC_CHK_MVP_HPTELE, OnChkMvpHptele)
  73. ON_BN_CLICKED(IDC_CHK_MVP_ATTACK2, OnChkMvpAttack2)
  74. ON_BN_CLICKED(IDC_CHK_MVP_AUTOATTACK, OnChkMvpAutoattack)
  75. ON_BN_CLICKED(IDC_CHK_MVP_PROTECT, OnChkMvpProtect)
  76. ON_BN_CLICKED(IDC_CHK_MVP_REGIONATTACK, OnChkMvpRegionattack)
  77. //}}AFX_MSG_MAP
  78. END_MESSAGE_MAP()
  79. /////////////////////////////////////////////////////////////////////////////
  80. // CDlgSetMvp message handlers
  81. void CDlgSetMvp::OnOK() 
  82. {
  83. // TODO: Add your specialized code here and/or call the base class
  84. UpdateData(true);
  85. CPropertyPage::OnOK();
  86. }
  87. BOOL CDlgSetMvp::OnInitDialog() 
  88. {
  89. CPropertyPage::OnInitDialog();
  90. // TODO: Add extra initialization here
  91. CComboBox *pCombo;
  92. pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_HPITEM);
  93. utlAddComboHPItem(pCombo);
  94. pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_SPITEM);
  95. utlAddComboSPItem(pCombo);
  96. pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_ATTACKSKILL);
  97. utlAddComboAttackSkill(pCombo);
  98. pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_REGIONSKILL);
  99. utlAddComboAttackSkill(pCombo);
  100. pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_ATTACK2SKILL);
  101. utlAddComboAttackSkill(pCombo);
  102. pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_ATTACK2_COND);
  103. utlAddComboProtectState(pCombo);
  104. pCombo = (CComboBox*)GetDlgItem(IDC_EDT_MVP_PROTECTSKILL);
  105. utlAddComboProtectSkill(pCombo);
  106. CSpinButtonCtrl *pSpin;
  107. pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_SPN_MVP_MONNUMBER);
  108. pSpin->SetRange(0, 20);
  109. UpdateData(false);
  110. return TRUE;  // return TRUE unless you set the focus to a control
  111.               // EXCEPTION: OCX Property Pages should return FALSE
  112. }
  113. void CDlgSetMvp::OnChkMvpHp() 
  114. {
  115. // TODO: Add your control notification handler code here
  116. UpdateData(true);
  117. }
  118. void CDlgSetMvp::OnChkMvpSp() 
  119. {
  120. // TODO: Add your control notification handler code here
  121. UpdateData(true);
  122. }
  123. void CDlgSetMvp::OnChkMvpHptele() 
  124. {
  125. // TODO: Add your control notification handler code here
  126. UpdateData(true);
  127. }
  128. void CDlgSetMvp::OnChkMvpAttack2() 
  129. {
  130. // TODO: Add your control notification handler code here
  131. UpdateData(true);
  132. }
  133. void CDlgSetMvp::OnChkMvpAutoattack() 
  134. {
  135. // TODO: Add your control notification handler code here
  136. UpdateData(true);
  137. }
  138. void CDlgSetMvp::OnChkMvpProtect() 
  139. {
  140. // TODO: Add your control notification handler code here
  141. UpdateData(true);
  142. }
  143. void CDlgSetMvp::OnChkMvpRegionattack() 
  144. {
  145. // TODO: Add your control notification handler code here
  146. UpdateData(true);
  147. }