You did exactly what I would have done. My LO is now 19 months and doesn't seem to know his own strength, in a way. Mostly he "hits" me (more like a strong pat on the cheek, really) when he's excited and playing. If he gets too rough, I just give the mad/sad face and say "No, no, I don't like it" and then help him touch me softly and gently and make a really happy face and say "oh, I like your gentle touches". He's gotten over the laughing at me and mostly doesn't hit me anymore, and he can even catch himself sometimes and he'll stroke my face and say "nice". I think what you did is spot on. It takes a really really long time sometimes for them to really understand that what they're doing is causing you discomfort.
I would also look for the underlying cause of her hitting. Is she doing it when she's frustrated? excited? bored? A lot of times looking at why they're doing it helps you know how to react.