DlgSetMvp.cpp
资源名称:ROA3.40.rar [点击查看]
上传用户:tianheyiqi
上传日期:2010-04-16
资源大小:282k
文件大小:6k
源码类别:
外挂编程
开发平台:
Visual C++
- // DlgSetMvp.cpp : implementation file
- //
- #include "stdafx.h"
- #include "roa.h"
- #include "DlgSetMvp.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDlgSetMvp property page
- IMPLEMENT_DYNCREATE(CDlgSetMvp, CPropertyPage)
- CDlgSetMvp::CDlgSetMvp() : CPropertyPage(CDlgSetMvp::IDD)
- {
- //{{AFX_DATA_INIT(CDlgSetMvp)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- CDlgSetMvp::~CDlgSetMvp()
- {
- }
- void CDlgSetMvp::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CDlgSetMvp)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- DDX_Check(pDX, IDC_CHK_MVP_HP, m_settingmvp.autoheal.bHP);
- DDX_Text(pDX, IDC_EDT_MVP_HP1L, m_settingmvp.autoheal.nHP1Lower);
- DDX_Text(pDX, IDC_EDT_MVP_HP1H, m_settingmvp.autoheal.nHP1Upper);
- DDX_CBString(pDX, IDC_CMB_MVP_HPITEM, m_settingmvp.autoheal.strHP1Item);
- DDX_Text(pDX, IDC_EDT_MVP_HP2L, m_settingmvp.autoheal.nHP2Lower);
- DDX_Text(pDX, IDC_EDT_MVP_HP2H, m_settingmvp.autoheal.nHP2Upper);
- GetDlgItem(IDC_EDT_MVP_HP1L)->EnableWindow(m_settingmvp.autoheal.bHP);
- GetDlgItem(IDC_EDT_MVP_HP1H)->EnableWindow(m_settingmvp.autoheal.bHP);
- GetDlgItem(IDC_CMB_MVP_HPITEM)->EnableWindow(m_settingmvp.autoheal.bHP);
- GetDlgItem(IDC_EDT_MVP_HP2L)->EnableWindow(m_settingmvp.autoheal.bHP);
- GetDlgItem(IDC_EDT_MVP_HP2H)->EnableWindow(m_settingmvp.autoheal.bHP);
- DDX_Check(pDX, IDC_CHK_MVP_SP, m_settingmvp.autoheal.bSP);
- DDX_Text(pDX, IDC_EDT_MVP_SPH, m_settingmvp.autoheal.nSPUpper);
- DDX_CBString(pDX, IDC_CMB_MVP_SPITEM, m_settingmvp.autoheal.strSPItem);
- GetDlgItem(IDC_EDT_MVP_SPH)->EnableWindow(m_settingmvp.autoheal.bSP);
- GetDlgItem(IDC_CMB_MVP_SPITEM)->EnableWindow(m_settingmvp.autoheal.bSP);
- DDX_Check(pDX, IDC_CHK_MVP_HPTELE, m_settingmvp.autoheal.bHPTele);
- DDX_Text(pDX, IDC_EDT_MVP_HPTL, m_settingmvp.autoheal.nHPTeleUpper);
- GetDlgItem(IDC_EDT_MVP_HPTL)->EnableWindow(m_settingmvp.autoheal.bHPTele);
- DDX_Check(pDX, IDC_CHK_MVP_AUTOATTACK, m_settingmvp.bAttack);
- DDX_CBString(pDX, IDC_CMB_MVP_ATTACKSKILL, m_settingmvp.strAttackSkill);
- GetDlgItem(IDC_CMB_MVP_ATTACKSKILL)->EnableWindow(m_settingmvp.bAttack);
- DDX_Check(pDX, IDC_CHK_MVP_FOLLOW, m_settingmvp.bFollow);
- DDX_Check(pDX, IDC_CHK_MVP_REGIONATTACK, m_settingmvp.bRegionAtk);
- DDX_CBString(pDX, IDC_CMB_MVP_REGIONSKILL, m_settingmvp.strRegionAtkSkill);
- DDX_Text(pDX, IDC_EDT_MVP_MONNUMBER, m_settingmvp.nRegionAtkNum);
- GetDlgItem(IDC_CMB_MVP_REGIONSKILL)->EnableWindow(m_settingmvp.bRegionAtk);
- GetDlgItem(IDC_EDT_MVP_MONNUMBER)->EnableWindow(m_settingmvp.bRegionAtk);
- GetDlgItem(IDC_SPN_MVP_MONNUMBER)->EnableWindow(m_settingmvp.bRegionAtk);
- DDX_Check(pDX, IDC_CHK_MVP_ATTACK2, m_settingmvp.bAttack2);
- DDX_CBString(pDX, IDC_CMB_MVP_ATTACK2_COND, m_settingmvp.strAttack2Cond);
- DDX_CBString(pDX, IDC_CMB_MVP_ATTACK2SKILL, m_settingmvp.strAttack2Skill);
- GetDlgItem(IDC_CMB_MVP_ATTACK2_COND)->EnableWindow(m_settingmvp.bAttack2);
- GetDlgItem(IDC_CMB_MVP_ATTACK2SKILL)->EnableWindow(m_settingmvp.bAttack2);
- DDX_Check(pDX, IDC_CHK_MVP_PROTECT, m_settingmvp.bProtect);
- DDX_CBString(pDX, IDC_EDT_MVP_PROTECTSKILL, m_settingmvp.strProtectSkill);
- GetDlgItem(IDC_EDT_MVP_PROTECTSKILL)->EnableWindow(m_settingmvp.bProtect);
- DDX_Check(pDX, IDC_CHK_MVP_ANTIBLESS, m_settingmvp.bAntiBless);
- }
- BEGIN_MESSAGE_MAP(CDlgSetMvp, CPropertyPage)
- //{{AFX_MSG_MAP(CDlgSetMvp)
- ON_BN_CLICKED(IDC_CHK_MVP_HP, OnChkMvpHp)
- ON_BN_CLICKED(IDC_CHK_MVP_SP, OnChkMvpSp)
- ON_BN_CLICKED(IDC_CHK_MVP_HPTELE, OnChkMvpHptele)
- ON_BN_CLICKED(IDC_CHK_MVP_ATTACK2, OnChkMvpAttack2)
- ON_BN_CLICKED(IDC_CHK_MVP_AUTOATTACK, OnChkMvpAutoattack)
- ON_BN_CLICKED(IDC_CHK_MVP_PROTECT, OnChkMvpProtect)
- ON_BN_CLICKED(IDC_CHK_MVP_REGIONATTACK, OnChkMvpRegionattack)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CDlgSetMvp message handlers
- void CDlgSetMvp::OnOK()
- {
- // TODO: Add your specialized code here and/or call the base class
- UpdateData(true);
- CPropertyPage::OnOK();
- }
- BOOL CDlgSetMvp::OnInitDialog()
- {
- CPropertyPage::OnInitDialog();
- // TODO: Add extra initialization here
- CComboBox *pCombo;
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_HPITEM);
- utlAddComboHPItem(pCombo);
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_SPITEM);
- utlAddComboSPItem(pCombo);
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_ATTACKSKILL);
- utlAddComboAttackSkill(pCombo);
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_REGIONSKILL);
- utlAddComboAttackSkill(pCombo);
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_ATTACK2SKILL);
- utlAddComboAttackSkill(pCombo);
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_MVP_ATTACK2_COND);
- utlAddComboProtectState(pCombo);
- pCombo = (CComboBox*)GetDlgItem(IDC_EDT_MVP_PROTECTSKILL);
- utlAddComboProtectSkill(pCombo);
- CSpinButtonCtrl *pSpin;
- pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_SPN_MVP_MONNUMBER);
- pSpin->SetRange(0, 20);
- UpdateData(false);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void CDlgSetMvp::OnChkMvpHp()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }
- void CDlgSetMvp::OnChkMvpSp()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }
- void CDlgSetMvp::OnChkMvpHptele()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }
- void CDlgSetMvp::OnChkMvpAttack2()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }
- void CDlgSetMvp::OnChkMvpAutoattack()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }
- void CDlgSetMvp::OnChkMvpProtect()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }
- void CDlgSetMvp::OnChkMvpRegionattack()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- }