Since wine is clearly forbidden, we are not allowed to consume it in any form, whether by itself or used in cooking.
If, however, you did consume the food unknowingly you are excused. This in no way means you are allowed to repeat the mistake or try to rationalize it by saying that the wine is dissolved in the food. The same could be said of any of the forbidden things. Once something has been declared as haraam or unlawful, we are ordered to abstain from it.
I pray to Allah to inspire you to love the things. He has declared as lawful for us, and abhor and shun those things. He has forbidden.