Magnetic fields in hot stars and what we can learn for cool stars