Vcl.Themes.TCustomStyleEngine.RegisterStyleHook

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class procedure RegisterStyleHook(ControlClass: TClass;
StyleHookClass: TStyleHookClass); virtual;

C++

__classmethod virtual void __fastcall RegisterStyleHook(System::TClass ControlClass, TStyleHookClass StyleHookClass);

Properties

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

Description

Registers a style hook for the given VCL component class and its descendants.

For example, to register the style hook for TCustomButton, the following code is used:

TCustomStyleEngine.RegisterStyleHook(TCustomButton,TButtonStyleHook);

If style hooks are already registered for the given ControlClass, StyleHookClass is added to the existing list of style hooks. Implicitly, the latest registered style hook is used.

Parameter Meaning
ControlClass The VCL component class for which the style hook is registered.
StyleHookClass The style hook class that is added to the style hooks that are already registered for the ControlClass.

If the StyleHookClass is already registered for ControlClass, an exception is raised.

See Also