Aims. The growing population of planets discovered in orbit around one stellar component of a binary star raises the question of the influence of the binary companion on the formation process of planetary systems. The aim of this work is to study the impact of a binary companion on the evolution of two-planet systems during both the type-II migration phase and their long-term evolution after the dissipation of the protoplanetary disk. Methods. We use the symplectic integrator SyMBA, modified to include a wide binary companion. We also include the Type-II migration of giant planets during the protoplanetary disk phase with suitable eccentricity and inclination damping as well as the gravitational potential acting on the planets due to the disk and the nodal precession of the disk induced by the binary companion. We consider various inclinations, eccentricities, and separations of the binary companion. Results. Disk migration allows the formation of planet pairs in mean-motion resonances despite the presence of the binary companion. When the binary separation is wide (1000 au), the timescale of the perturbations it raises on the planets is longer than the disk's lifetime and resonant pairs are routinely formed in the 2:1, 5:2 and 3:1 commensurabilities. Provided the planet-planet interaction timescale is smaller than the binary perturbations timescale, these systems can remain in resonance long after the disk has dissipated. When the binary separation is smaller (250 au), only planets in the 2:1 resonance tend to remain in a resonant state and more chaotic evolutions are observed, as well as more ejections. After those ejections, the remaining planet can become eccentric due to the perturbations from the binary companion and for strongly inclined binary companions captures in the von Ziepel-Lidov-Kozai resonance can occur, while in systems with two planets this mechanism is quenched by planet-planet interactions. Our simulations reveal that the interplay between planet-disk, planet-planet and planet-binary interactions can lead to the formation of resonant pairs of planets which remain stable over timescales much longer than the disk's lifetime.