-
Notifications
You must be signed in to change notification settings - Fork 117
VCLStylesHook
The Vcl.Styles.Hook unit, install a set of hooks in a few WinApi (GetSysColor, GetSysColorBrush) and Windows Themes (UxTheme) methods like DrawThemeBackground and DrawThemeBackgroundEx, this allow to manipulate the drawing of the system elements which are not reachable via another method.
As you can see some controls uses the native windows theme to draw the highlight colors.
Including the Vcl.Styles.Hook unit in your project the system colors are replaced by the proper VCL Style colors.
When you uses a TListView setting the CheckBoxes property to True and with the VCL Styles enabled the control will look like so
Now including the VCL.Styles.Hooks unit to your project the checkbox control is properly drawn using the current active VCL Style.
Also this unit add support for styling the Listview groups. ListView with VCL Styles
ListView with VCL Styles + Vcl.Styles.Hooks unit
A similar improvement was applied to the TTreeview controls. by default the opened and closed glyphs are draw using the native look and feel
And now using the VCL.Styles.Hooks unit
The Styling of the TMonthCalendar and TDatetimepicker components is one of the limitations of the VCL Styles, because such components are owner-draw by the system and doesn’t allow to customize the look and feel when the native themes are enabled also only the newest versions of Delphi includes a partial styling support for such components. The Vcl.Styles.Hooks add styling support for these controls.
TDateTimePicker and TMonthCalendar with VCL Styles
TDateTimePicker and TMonthCalendar with VCL Styles + Vcl.Styles.Hooks unit
For more info check these articles