RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AxCtrls.GetOleFont Function

Creates an OLE font object that is directly mapped to a native TFont.

Pascal
procedure GetOleFont(Font: TFont; var OleFont: IFontDisp);
C++
GetOleFont(TFont Font, IFontDisp OleFont);

AxCtrls

OLE conventions implement fonts as automation objects that contain the properties of the font. This routine creates an adapter object that maps the properties of a TFont object into an OLE font object, thereby allowing an OLE client to access the font properties of a VCL control. Call this function when you implement a method that retrieves a TFont value from a VCL object and returns it as an OLE font. 

The Font parameter is a pointer to the native TFont. This can be the Font property of a VCL control. The OLE font is returned in the OleFont parameter. The resulting OLE font object is a direct connection to the native VCL font, so changing the OLE font's properties will change the TFont's properties, and vice-versa. 

 

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