#ifdef __ANARCHY_SYSTEMCWndAnarchySkill::CWndAnarchySkill(){ m_nGold = 0; m_nCurrentPage = 0; m_nMaxPage = 0; m_fGaugeRate = 0; m_nSmeltWidth = -1; ZeroMemory(m_pWndRect, sizeof m_pWndRect); ZeroMemory(m_pTexture, sizeof m_pTexture); ZeroMemory(m_pWndButton, sizeof m_pWndButton); ZeroMemory(m_pWndStaticName, sizeof m_pWndStaticName); ZeroMemory(m_pWndStaticPrice, sizeof m_pWndStaticPrice);}CWndAnarchySkill::~CWndAnarchySkill(){ ZeroMemory(m_pWndRect, sizeof m_pWndRect); ZeroMemory(m_pTexture, sizeof m_pTexture); ZeroMemory(m_pWndButton, sizeof m_pWndButton); ZeroMemory(m_pWndStaticName, sizeof m_pWndStaticName); ZeroMemory(m_pWndStaticPrice, sizeof m_pWndStaticPrice);}BOOL CWndAnarchySkill::Initialize(CWndBase* pWndParent, DWORD nType){ return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_ANARCHY_SKILL, 0, CPoint(0, 0), pWndParent);}BOOL CWndAnarchySkill::OnChildNotify(UINT message, UINT nID, LRESULT* pLResult){ switch (nID) { case WIDC_BUTTON: // first buff case WIDC_BUTTON3: // second buff case WIDC_BUTTON4: // third buff case WIDC_BUTTON5: // fourth buff { int id = m_nCurrentPage * 4; if (nID == WIDC_BUTTON3) id += 1; else if (nID == WIDC_BUTTON4) id += 2; else if (nID == WIDC_BUTTON5) id += 3; auto pBuff = &prj.m_vAnarchyBuffProp.at(id); int nAnarchyCoin = g_pPlayer->GetItemNum(II_SYS_SYS_SCR_PERIN); int nCost = pBuff->nPerin; if (nCost > nAnarchyCoin) { g_WndMng.PutString("You don't have enough perin to do anarchy."); return FALSE; } SAFE_DELETE(g_WndMng.m_pWndAnarchySkillConfirm); g_WndMng.m_pWndAnarchySkillConfirm = new CWndAnarchySkillConfirm(id); g_WndMng.m_pWndAnarchySkillConfirm->m_nMode = 0; g_WndMng.m_pWndAnarchySkillConfirm->Initialize(); } break; case WIDC_BUTTON2: // prev { if (m_nCurrentPage == 0) SetCurrentPage(m_nMaxPage); else SetCurrentPage(--m_nCurrentPage); } break; case WIDC_BUTTON1: // next { if (m_nCurrentPage == m_nMaxPage) SetCurrentPage(0); else SetCurrentPage(++m_nCurrentPage); } break; } return CWndNeuz::OnChildNotify(message, nID, pLResult);}void CWndAnarchySkill::OnDraw(C2DRender* p2DRender){ for (int i = 0 + m_nCurrentPage * 4; i < 4 + m_nCurrentPage * 4 && i < (int)prj.m_vAnarchyBuffProp.size(); ++i) { m_pTexture[i]->Render(p2DRender, m_pWndRect[i % 4].TopLeft(), CPoint(32, 32)); } if (m_nMaxPage > 0) { int xPos = 0; for (int i = 0; i < m_nMaxPage + 1; i++) { CString edit; edit.Format("%d ", i + 1); if (i == m_nCurrentPage) p2DRender->TextOut(160 + xPos, 185, edit, 0xff0000ff); else p2DRender->TextOut(160 + xPos, 190, edit, 0xff000000); xPos += 15; } }}HRESULT CWndAnarchySkill::RestoreDeviceObjects(){ CWndBase::RestoreDeviceObjects(); m_nSmeltWidth = -1; return S_OK;}HRESULT CWndAnarchySkill::InvalidateDeviceObjects(){ CWndBase::InvalidateDeviceObjects(); return S_OK;}HRESULT CWndAnarchySkill::DeleteDeviceObjects(){ CWndBase::DeleteDeviceObjects(); return InvalidateDeviceObjects();}void CWndAnarchySkill::OnInitialUpdate(){ CWndNeuz::OnInitialUpdate(); m_pWndStaticIcon[0] = (CWndStatic*)GetDlgItem(WIDC_STATIC11); m_pWndStaticIcon[1] = (CWndStatic*)GetDlgItem(WIDC_STATIC111); m_pWndStaticIcon[2] = (CWndStatic*)GetDlgItem(WIDC_STATIC1111); m_pWndStaticIcon[3] = (CWndStatic*)GetDlgItem(WIDC_STATIC11111); m_pWndRect[0] = GetDlgItem(WIDC_STATIC11)->GetWndRect(); m_pWndRect[1] = GetDlgItem(WIDC_STATIC111)->GetWndRect(); m_pWndRect[2] = GetDlgItem(WIDC_STATIC1111)->GetWndRect(); m_pWndRect[3] = GetDlgItem(WIDC_STATIC11111)->GetWndRect(); m_pWndButton[0] = (CWndButton*)GetDlgItem(WIDC_BUTTON); m_pWndButton[1] = (CWndButton*)GetDlgItem(WIDC_BUTTON3); m_pWndButton[2] = (CWndButton*)GetDlgItem(WIDC_BUTTON4); m_pWndButton[3] = (CWndButton*)GetDlgItem(WIDC_BUTTON5); m_pWndStaticName[0] = (CWndStatic*)GetDlgItem(WIDC_STATIC); m_pWndStaticName[1] = (CWndStatic*)GetDlgItem(WIDC_STATIC2); m_pWndStaticName[2] = (CWndStatic*)GetDlgItem(WIDC_STATIC4); m_pWndStaticName[3] = (CWndStatic*)GetDlgItem(WIDC_STATIC6); m_pWndStaticPrice[0] = (CWndStatic*)GetDlgItem(WIDC_STATIC1); m_pWndStaticPrice[1] = (CWndStatic*)GetDlgItem(WIDC_STATIC3); m_pWndStaticPrice[2] = (CWndStatic*)GetDlgItem(WIDC_STATIC5); m_pWndStaticPrice[3] = (CWndStatic*)GetDlgItem(WIDC_STATIC7)