2.1.25.5 DeleteEnhMetaFile


Description

deletes an enhanced metafile object

Syntax

BOOL DeleteEnhMetaFile( HENHMETAFILE hEnhMf )

Parameters

hEnhMf
[input] a handle to an enhanced metafile object

Return

returns FALSE if fail else non zero.

Examples

EX1

int DeleteEnhMetaFile_ex1()
{
    GraphPage gp;
    gp.Create("origin.otp");
    
    HENHMETAFILE    hemf;
    PictureHolder ph;
    
    if( !gp.IsValid() )
        return -1;
    else
    {
        hemf = gp.CreateImage(CF_ENHMETAFILE,600,0);
        ph.CreateFromEnhMetafile(hemf,true);
        if(!ph)
            out_str("Create fail");
    }
    
    DeleteEnhMetaFile(hemf);
    PictureHolder phCheckOwner;

    if(phCheckOwner.CreateFromEnhMetafile(hemf,false))
    {
        out_str("error, hemf should destroy be delete by Function DeleteEnhMetaFile.");
    }
    else
        out_str("work fine");
    return 0;
}

Remark

See Also

DeleteMetaFile

Header to Include

origin.h

Reference