My tests (VC6 and Borland CPPB4) disagree with yours - the copy constructor is called for the catch declared as taking a reference. For a function that takes a reference, it's true that the CC isn't called - the trick here is that the throw() operand causes a copy of its argument to be created. Check out "C++ Exception Examples" in the MSDN.
The reason that an exception doesn't occur in this code in release is because the optimizer will throw all the code away as it does nothing... As soon as you include the cout z has to around so a value can be displayed hence the exception - In a debug build no code is optimized hence you get the behaviour expected.
That's not simple. You have to draw the caption by yourself. I don't know what to do exactly, but you have to handle many window messages, such as WM_NCPAINT, WM_NCACTIVATE and more...