RAD Studio VCL Reference
AxCtrls.SetOleFont Function

Connects an OLE font object to a TFont object and copies the properties of the OLE font object to the TFont.

procedure SetOleFont(Font: TFont; OleFont: IFontDisp);
SetOleFont(TFont Font, IFontDisp OleFont);

OLE conventions implement fonts as automation objects that contain the properties of the font. This routine associates an OLE font object (the OleFont parameter) with a native VCL font (the Font parameter), allowing the font to be accessed by both OLE programs and VCL programs. The TFont object is initialized to have the same properties as OleFont. 

Call this method when you implement an automation method that takes an OLE font as a parameter, and which needs to pass the font along as a native TFont object. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!