If you want to turn OFF hardware PWM & have a solid logic output on the CCP pin, don't rely on using the HPWM command with a zero duty-cycle. Just use CCP1CON = 0 to disable the PWM module, then set/clear the pin as required.

After clearing CCP1CON, you can simply issue the HPWM command again, and PBP will automatically configure CCP1CON for PWM mode.

Some I/O-pins are multiplexed with peripherals. When these peripherals are enabled, they may "override" the TRIS bit for a pin. Even though the HPWM command does leave the TRIS bit set to output, and it leaves a zero in the output latch, if the PWM module is still enabled, and not outputting a PWM signal, you'll see a high impedance on the CCP output pin.