Based on the design equilibrium of a fusion-reactor-level device, this paper systematically investigates the active control mechanism of edge localized modes (ELMs) via electron cyclotron wave (ECW) injection through comprehensive numerical simulations. A three-field reduced magnetohydrodynamic (MHD) model within the BOUT++ framework is employed, coupled with ray-tracing calculations from the GENRAY code, to simulate the localized deposition characteristics of ECW in the pedestal region and its subsequent impact on the stability of peeling-ballooning (P-B) modes. The simulations are performed under reactor-relevant plasma parameters, with ECW power deposition profiles systematically varied across the pedestal to assess their influence on ELM dynamics. The results show that the ECW deposition location plays a decisive role in ELM control. Specifically, mid-pedestal deposition enhances P-B mode instability and increases ELM energy loss, whereas deposition at the bottom of pedestal effectively mitigates ELMs. In this process, ECW-induced pressure perturbation is identified as the dominant factor influencing P-B mode stability. Furthermore, the plasma resistivity is found to significantly modulate the effectiveness of ECW control, exhibiting a strong coupling with the deposition location. For mid-pedestal deposition, the mitigation effect shows a clear resistivity dependence: under low-resistivity conditions, ECW injection effectively suppresses ELMs, whereas under high-resistivity conditions, it exacerbates ELM instability, leading to increased energy loss. This occurs because pressure perturbations induced by mid-pedestal deposition reshape the pedestal structure: at low resistivity, a narrower, steeper local pedestal forms that limits the crash width, while at high resistivity, the inherently stronger P-B mode instability causes multiple crash regions to develop, enlarging the overall energy loss. These findings highlight that the effectiveness of ECW-based ELM control depends on the synergistic interplay of deposition location and plasma parameters. This study provides important theoretical insights and optimization strategies for ECW-based ELM control in large-scale fusion devices.