1st: Good woman! Well done you! You must be feeling great.
2nd: I think it's one of those situations where it's impossible to say the right thing, to be honest, and anything you say could potentially be wrong. (Bereavement is the most obvious example of this problem.) It's a very sensitive subject for most people, and it can be hard for them to think through regarding their own weight, so they may not realise that what they think is a compliment is actually really annoying. They went to some trouble not to say, "Damn it, why can you lose weight when I can't manage to?" after all, so they think they're being really helpful!
And come to that, there are some situations where compliments always seem to come out oddly. I've always had long hair. It's waist-length now, but until a year or so ago it was fingertip length. People comment on it all the time and always have. Probably 80% of the compliments I've had about my hair have been the expression, "You've got such long hair!" which hey, I already knew. But the way they say it makes it clear that it's intended as a compliment, so I thank them nicely. I've been guilty of saying, "You've had a haircut!" instead of, "Your new haircut looks great!" myself, after all.