When it is a family member I want a relationship with, I paraphrase the question or comment for them. When he/she says, "What's wrong NOW?" I say "You mean right this minute, or are you impatient right now? " Paraphrasing and questioning them helps them to realize how their words can come across.
We have to remember our families will not always be supportive and patient, so I try not to hurt them even when I feel they have hurt me. Showing this effort and voicing how their comment has hurt you, helps the situation by two ways: it helps them understand what upsets you, and it helps you to identify whether that relationship is worthy of your emotions and time.
Although I don't advocate confrontations, it is always best to stick up for yourself especially when its the only language the offender understands.....When it is a person trying to be mean and insulting, I tell them:
"Get educated before making anymore asinine comments" and walk away shaking your head in disbelief.
"Actual experience, education, and assumptions are completely different things."
Or if their comment has really wounded or pissed me off:
I start clapping and say "Wow, I am really impressed at your sensitivity and people skills", and add " you must have a lot of friends..."
For the know-it-all: "Really? Did you read that from a book or did you make it up?"
"Maybe that's how it is in your lala land, but not in my reality."