As far as the food I will always scope out the offerings and pick some things I like and know won't kill my blood sugar (if possible). I try if appropriate to find out what is being served ahead of time and will bring my own contribution so I know there will often be one thing at least I can eat (as a vegetarian I often do that, because that is non-negotiable to me). I guess a 4th of July barbecue has pretty standard fare so you know there will be things you can eat. (Meat without bread, cheese, salads, etc).
As for people who say, "you can just have a little". If they are acquaintances I I'll give a very minimal reply. it's taken me most of my life to realize I can just nod and smile and do whatever I want! If they are people I'm close to and I see them often I'll do some explaining/educating at first like how carbs affect blood sugar, how variable blood sugar can be, how I can eat most things but sometimes choose not to because it will make my blood sugar soar, etc. Etc. If they persist with their "you can have somes". I'll make a point of "we need to talk" and say how I really appreciate their offers and no they mean well, but it really ends up making it harder on me and I really need them to let me make my own choices or (if they are the host) offer more D friendly foods for me. (I've never forgotten a good friend when I stopped eating sugar which was soooo hard for me. At a dinner where everyone was oohing and ahhing over some dessert she made me a latte and a small cheese and fruit plate. That meant so much to me)
Then there is my own personal way of dealing with people who despite all the above don't get it and continue to harass me: I decide life is too short to spend any more of it in their ignorant company. Not a way to win friends and influence people, but then I prefer quality not quantity in my friendships.