The invention relates to a cosmetic process for treating keratin materials, comprising: either the sequential application to the keratin materials of a composition comprising a maleic anhydride ethylenic polymer and of an amine compound chosen from polyamine compounds bearing several primary amine and/or secondary amine groups and amino alkoxysilanes, or the topical application to the keratin materials of a composition derived from the mixing of a composition comprising a maleic anhydride acrylic polymer and of an amine compound chosen from amino alkoxysilanes; the ethylenic polymer being derived from the polymerization of: (a) 45% to 95% by weight, relative to the total weight of monomers, of an ethylenic monomer bearing an at least C8 linear or branched alkyl group; (b) 5% to 25% by weight of maleic anhydride; (c) 0 to 50% by weight of additional monomer; the compositions used being anhydrous when the amine compound is an amino alkoxysilane. The process makes it possible to obtain a film-forming deposit that has good resistance to water, to oil and to sebum. The film is also non-tacky and transfer-resistant.