Vcl.AxCtrls.GetOleFont

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure GetOleFont(Font: TFont; var OleFont: IFontDisp);

C++

extern DELPHI_PACKAGE void __fastcall GetOleFont(Vcl::Graphics::TFont* Font, _di_IFontDisp &OleFont);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.AxCtrls.pas
Vcl.AxCtrls.hpp
Vcl.AxCtrls Vcl.AxCtrls

Description

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

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.

See Also