wmf handling routine now handles emf as well