Compartilhar via


CPictureHolder::CreateFromMetafile

Uses a metafile to initialize the picture object in a CPictureHolder.

BOOL CreateFromMetafile( 
   HMETAFILE hmf, 
   int xExt, 
   int yExt, 
   BOOL bTransferOwnership = FALSE  
);

Parameters

  • hmf
    Handle to the metafile used to create the CPictureHolder object.

  • xExt
    X extent of the picture.

  • yExt
    Y extent of the picture.

  • bTransferOwnership
    Indicates whether the picture object will take ownership of the metafile object.

Return Value

Nonzero if the object is successfully created; otherwise 0.

Remarks

If bTransferOwnership is TRUE, the caller should not use the metafile object in any way after this call returns. If bTransferOwnership is FALSE, the caller is responsible for ensuring that the metafile object remains valid for the lifetime of the picture object.

Requirements

Header: afxwin.h

See Also

Reference

CPictureHolder Class

Hierarchy Chart

CPictureHolder::CreateEmpty

CPictureHolder::CreateFromBitmap

CPictureHolder::CreateFromIcon