Ugh. Yes I feel a bit of a soapbox coming on too. I wasn't born fat, I was thin all through my teens and twenties. I had a nice figure and I got a lot of attention. Both wanted and unwanted.
I didn't deal with it well. I played the wanted attention in ways that probably weren't always very nice and I didn't know what to do with the unwanted attention.
To be very honest? Some guys are particularly clueless. For those kind, not a lot works. Obviously being less friendly helps a little, but why should you have to change who YOU are in order to get people to leave you alone? When you are losing weight, you are happy, that happiness shows on your face and in your demeanor. Some interpret that as "available" or "non threatening" and someone who might be easy to approach.
Guys in a lot of ways have the harder job of courtship. They have to risk rejection a lot. Those who develop the thickest skin, who take on any girl they think they might have a chance with, are usually the ones you really want NOTHING to do with. They seem to have no subtlety. No ability to read people. No humility. How do you get these slimy creepy guys to leave you alone without discouraging the nice ones? Not easy. I think it does come with a bit of a "snotty" attitude. Problem is when you take that on, you don't LIKE yourself! If you back down after once trying it though then you've compromised and sent mixed messages.
I remember once when I was in my 20s, I went to an ATM machine. They were rather a new thing then, and I was waiting my turn in line. I was in a really bad mood, had just had a fight with my mother and I was seriously angry with her. I was dressed really attractively, however in a red skirt that semi wrapped across the front and had a draped effect where when I took a step part of it would come open a bit, and a black shiny blouse.
Well this creepy guy was staring at me on the street, staring particularly at my skirt, like he was waiting to see if it would open all the way up so he could see more. (It wouldn't, it wasn't that kind of skirt).
It just grossed me out the way he was looking at me, like he wanted to consume me or something. The attention was MOST unwelcome. So because I was in a lousy mood anyway I said to him "What are YOU looking at?"
He was actually offended. Acted like I had insulted him or something. Because I like to think of myself as a nice person, I wound up apologizing to him, for my bad mood. That was a mistake, he then acted like his attentions WERE welcome after all! I hated myself at that time. I hated that I couldn't win either way. Couldn't seem to keep my distance from people I didn't want in my life, and still feel like a nice person.
The worst was the guy who asked me if I was married. I was separated and getting a divorce at the time, but I wasn't interested in him so I said "yes" His answer? "Do you fool around then?" "NO!" "Not EVER?" Creep!
Other unwanted attention included the married next door neighbor who wanted me to open my door and let him in. The creepy guys on the street that would try and get you to get into their cars, or who would follow you home from school, or who would leave pictures of their naked lower half on your car late at night! (Yes I had all that happen).
You learn to not make eye contact with the ones you don't want looking at you. You learn to turn and walk the other way if they are following you on the street. You learn to immediately drop the photos without looking at them and quickly get into your car and drive away before someone jumps out of the shadows with more on their mind than sharing their dirty pictures.
I hate to say it, but I think PART of the reason I allowed myself to get fat is I got tired of dealing with all that, got tired of not being allowed to think of myself as a NICE as well as attractive person. There seriously are disadvantages to having too nice of a figure. Guys (especially the creepy ones) think they own you, and if you let them know you don't want to deal with them you get labled a "*****" or a "snob" or "stuck up". NICE guys tend to be intimidated by you, and they sit back and watch how the creeps fare at approaching you. When you shut them down, the nice ones don't try....
That's hard to deal with. How do you learn to be "selectively" *****y and also friendly (with the ones you like) without appearing two faced?
Then there are the way your girlfriends act. That's a whole different issue.
My husband tells me that girls always have one really cute one in the group, and the rest who are not so attractive. Being a guy he tends to think this is intentional or something. I think it happens because girls love their friends for who they are, not what they look like, and the "cute" girl in the group may know she gets a little more attention than the others, but she feels her friends are just as beautiful. The friends don't always feel that way though. Sometimes their comments are hurtful. Sometimes they are envious and jealous of the attention that always seems to go to the most confident one in the group. And yet in some ways, they are friends with you because they LIKE your confidence, they like your ability to flirt and be friendly and draw those groups of guys.... (I'm talking late teenage years here).
I think things get more complicated when you are older. I dealt with it all pretty well when I was still a virgin. Once I had been married and divorced, and was no longer dealing with "boys" but with "men" it was much more deadly serious. Much more scary and much more insulting in many ways. More men were very overt in making it clear that what they were after was not a relationship, but simply sex.
I tend to think of myself as a moral person and that kind of attitude was a major turn off to me. Seems to be what a lot of men seem to think is possible these days though. No committment, no relationship, no love, no dating, just get the one thing they want and forget the niceties that used to be called courtship.
I seriously feel sorry for single women these days. I don't know how they deal with it. Some of them don't deal with it very well, one friend I'm thinking of in particular. She wants a relationship with a nice guy and keeps getting creeps. Ones who want sex, but not much more.
Anyway I'm rambling a bit and getting off topic. My suggestion to you is to continue to smile and be friendly, but do it without making as direct of eye contact (unless you seriously are interested in the guy). If a guy can't look in your eyes, he will know that it is a "general" friendliness, not a "specific" friendliness.