PictureControl::SetEnhMetaFile

Description

Sets a picture from a HENHMETAFILE to be displayed in the control

Syntax

BOOL SetEnhMetaFile( HENHMETAFILE hEnhMetafile, BOOL bTakeOwnership = TRUE )

Parameters

hEnhMetafile
bTakeOwnership
TRUE means that the control will destroy the object on destroy or on setting another picture

Return

return true when successful else false

Examples

EX1

#include <ocGDI.h>
#include <Control.h>

void PictureControl_SetEnhMetaFile()
{
        PictureControl pc;
        string path = GetAppPath() + "GraphMeta.emf";
        HENHMETAFILE henhmf1 = load_enhanced_metafile(path);
        pc.SetEnhMetaFile(henhmf1);
}

Remark

See Also

header to Include

Control.h