The information in this article applies to:
SYMPTOMSEnhanced metafiles do not appear in a non-active state in a OLE client when they are used by the server to render the image. A call to CDC::PlayMetaFile() in the OnDraw of the COleServerItem-derived class fails if it is passed an enhanced metafile. CAUSE
When an OLE client application asks the server for a metafile
representation of the server data when it is in an inactive state or
using Paste Special, the application asks for it in a standard metafile
format (CF_METAFILEPICT). The server cannot respond to this request.
However, most images can be rendered without a problem using standard
metafiles. RESOLUTIONIf your server is using enhanced metafiles, and the client is asking it to render to an standard metafile, you need to make a conversion. You can use GetEnhMetafileBits() to get each command of the enhanced metafile and copy the commands to a standard metafile using SetMetafileBitsEx(), or you can use the GetWinMetaFileBits() function to make the conversion. STATUSThis behavior is by design. MORE INFORMATIONUse the metafile format rather than the enhanced metafile. Check the documentation on the features of enhanced metafiles to determine whether this usage is appropriate for your application. REFERENCESFor more information on enhanced metafiles, see the "Enhanced-Format Metafiles" section in Online Help. Additional query words: 4.00 4.10 4.20
Keywords : kbole kbMFC kbVC |
Last Reviewed: July 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |