The present invention relates to a process for cosmetic treatment of the hair, in particular a hair shaping process, comprising the following steps: applying to the hair a composition comprising a liquid solvent system and a dispersion of particles that are insoluble in the solvent system, the particles comprising a material capable of changing state under the effect of an external stimulus, before, during or after the applying of the composition, shaping the hair to the desired hairstyle, then or simultaneously, applying one or more stimuli enabling the change of state of the material, stopping the stimulus or stimuli for obtaining fixing of the hairstyle.