Louis XIV was wearing high heels looooooooong before John Travolta in Saturday Night Fever. You will also learn that what you consider feminine fashions were originally male fashions adopted by females and later abandoned by males.
Louis XIV is not a good example to make this point. He wore high heels for 2 reasons, nothing to do with fashion as we're discussing it here.
First, Louis was one of the shortest men at his own court. His heels functioned more as lifts, to give him additional height, as befitted the King. He also wore tall wigs to further enhance the impression of his height.
Second, there was an affectation among 17th Century men, that continued into the 18th Century, of displaying a muscular calf under their white stockings, or in Louis' earlier years, full tights. Men would strike a pose to cause their calf to tighten, known in English as "making a leg". Louis himself is shown doing just that, in one of his most famous formal portraits. Wearing heels made that gesture easier.