I have had the same problem David described, multiple times in Spain, once in Hungary and at least once in Poland--and probably on other occasions I've since forgotten. DCC was really, really prevalent in Poland last year, and I have no doubt that within another year or two it will show up about 90% of the time when credit cards are used, as well as at almost all ATMs. I get really, really pushy when someone pulls that fast one on me, and I do not accept "I don't know how to cancel the transaction" as an answer. When you push back, you can expect a rather unpleasant encounter, but I think it's important to push back to help future travelers.
I have learned always to settle my hotel bill the night before departure so I can deal with any DCC funny business when I have time. A traveler is a sitting duck if he's paying his hotel bill in the morning on the way to the train station and standing at the desk looking at his watch. It's easy for the desk clerk to outwait a departing traveler who's in a hurry.
We have the ability to avoid most if not all cases of unwanted DCC. I think as Americans we are used to simply handing over our credit cards and waiting for the charge slip to be handed back to us. That allows the server/cashier to push a bunch of buttons to select US Dollars rather than the local currency. It's not supposed to work that way. We are supposed to keep hold of our card, looking at the screen all the time. If we do that, we are the person making the selection. I am still working on the "hold onto the card" business myself.
Poland is a real challenge, because the software in at least some of those devices knows you're from the US but is incapable (apparently) of displaying the instructions in English. The Polish instructions were totally incomprehensible to me. There was no arrow labeled "USD" or "$", pointing to a button on the device, so how was I supposed to know which button to choose? I ran into some servers who professed not to know, either--which might or might not be true. I have no idea how confusing the instructions may be in Polish.
What I've been trying to remember to do (not totally successfully) is pay the (usually small) tip in cash rather than by adding it to the credit card charge (which is sometimes but not always possible in Europe). That way, I get to see whether the server has somehow switched the currency despite my request to pay in euros, zloty, etc. If he or she has decided to ignore my request, there's no tip. So far I've been able to outwait restaurant personnel trying to take advantage of the poor dumb American and gotten the offending transaction canceled and reprocessed, but if I'm ever in a hurry, I figure not tipping will help make up for what I've lost on the bad conversion rate--which seems to vary between 3.5% and 7%.