RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMetafileCanvas.CreateWithComment Constructor

Creates an instance of TMetafileCanvas and acquires a handle to a metafile device context with a comment string.

Pascal
constructor CreateWithComment(AMetafile: TMetafile; ReferenceDevice: HDC; const CreatedBy: String; const Description: String);
C++
__fastcall TMetafileCanvas(TMetafile AMetafile, HDC ReferenceDevice, const AnsiString CreatedBy, const AnsiString Description);

Call CreateWithComment to create an instantiate a TMetafileCanvas object for a metafile that will receive the CreatedBy and Description strings. CreateWithComment sets the size of the TMetafile object from the ReferenceDevice if it does not already have the MMHeight and MMWidth properties set. Create then creates a metafile device context using the CreatedBy and Description strings as a description, and sets the Handle property to its handle. All subsequent drawing methods will draw to the metafile device context. 

When the TMetafileCanvas is destroyed, the CreatedBy and Description strings are used to set the properties of the same name in the TMetafile object. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!