Back to Basics Discipline by Janet Campbell Matson is awesome at this age for respect and gratitude. All the nice stuff in the world will be taken for granted if the negativity is allowed to fester. His consequences are not adequately off-putting if he feels fine to continue the behavior.
He needs to be treated with respect and kindness at all times like anyone else, and then when he behaves like that (unless there is a valid reason that he needs sympathy), his world needs to stop, a warning must be given, and if he keeps it up one more second SERIOUS and IMMEDIATE consequences need to happen, enough so that he thinks twice before doing it again and gets completely out of the habit of trying to act that way. He is old enough to be disciplined after the fact if you are in public and cannot act right away (my 4 year old has had that happen a few times). That really makes an impact the next time you give an advance warning of expectation. This behavior is pretty normal for kids who are getting away with it, and it takes CONSISTENCY to really drive the point home. I think it's great you are addressing it, you just may need to toughen up. He needs a calm warning (just one and NO YELLING) of something very firm in the moment to create and instant decision to drop the attitude.
Long drawn out things like missing activities and getting ignored are too mild and tedious and give power to the child for "making people angry for that long". I would keep calm, issue a warning, do something much firmer up front, and then tack on some hard work (sweat equity) to the back end..specifics in the book.
We've got three very gracious, happy kids who know not to complain etc, but we have had to discipline complaining, whining, being ungrateful very firmly until they realized it would never be acceptable (quick because we were absolutely consistent). It's normal! (your three year old probably won't be happy with everything forever either-hello age 5 and six :-0) You can fix this.
Keep talking to a minimum. Anything past "Cut the attitude" followed by immediate action is pretty much considered nagging and meaningless by boys that age. You can talk to him about respect and proper behavior in the big picture at other times when discipline isn't being implemented. That's when he'll be more receptive tot he message. But he'll still need discipline if he's red-blooded :)
It sounds more "primitive" than talking everything through and explaining things all the time, but for real, when you nip the wrong behavior, kids naturally fill it in with the right behavior, they don't need THAT much coaching. Mine don't. The typical progression is 1) meaningless melt- down or moping starts 2 )warning is given 3) behavior halts, child mellows out, and about two minutes later is laughing with siblings or we've turned it into a joke. The only time this isn't the progression is when excessive fatigue or pending illness are at play and the child doesn't feel good. At which time we give comfort and leave it alone-but all our kids have been nipped of dramatic blow ups, so quietly worn-out kids are not hard to deal with. They usually just go to sleep in the car or whatever.