Yeah, this can be done quite nicely, and makes my day job a helluvalot less sucky.
You need to install the mingw32 package from universe. This will give you all the usual gcc tools, prefixed with something like i586-mingw32.
What I do is run a script to set a whole bunch of environment variables, for instance
This is off the top of my head; the scripts are at work and I'm at home. Hopefully you get the gist. This allows me to build entire wxWidgets programs, targetted at Microsoft Windows, from the comfort of my Ubuntu box.