The role of wetting films in capillary condensation and rise: Influence of long-range forces