Vcl.Themes.TCustomStyleServices.GetTextExtent
Delphi
function GetTextExtent(DC: HDC; Details: TThemedElementDetails; const Text: string;
Flags: TTextFormat; out ExtentRect: TRect): Boolean; overload;
function GetTextExtent(DC: HDC; Details: TThemedElementDetails; const Text: string;
Flags: TTextFormat; const BoundingRect: TRect; out ExtentRect: TRect): Boolean; overload;
C++
bool __fastcall GetTextExtent(HDC DC, const TThemedElementDetails &Details, const System::UnicodeString Text, Vcl::Graphics::TTextFormat Flags, /* out */ Winapi::Windows::TRect &ExtentRect)/* overload */;
bool __fastcall GetTextExtent(HDC DC, const TThemedElementDetails &Details, const System::UnicodeString Text, Vcl::Graphics::TTextFormat Flags, const Winapi::Windows::TRect &BoundingRect, /* out */ Winapi::Windows::TRect &ExtentRect)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Themes.pas Vcl.Themes.hpp |
Vcl.Themes | TCustomStyleServices |
Description
Returns the rectangle that contains the given text, drawn in the current style.
Call GetTextExtent to obtain the rectangle required to draw the given text with the specified formatting in the current style.