We start from a basic version of the Hahn-Banach theorem, of which we provide a proof based on Tychonoff's theorem on the product of compact intervals. Then, in the first section, we establish conditions ensuring the existence of affine functions lying between a convex function and a concave one in the setting of vector spaces -- this directly leads to the theorems of Hahn-Banach, Mazur-Orlicz and Fenchel. In the second section, we caracterize those topological vector spaces for which certain convex functions are continuous -- this is connected to the uniform boundedness theorem of Banach-Steinhaus and to the closed graph and open mapping theorems of Banach. Combining both types of results readily yields topological versions of the theorems of the first section.