A Major updated was made to the VCL Styles Utils project. This version include several fixes and new features.
Vcl.Styles.Hooks
The Vcl.Styles.Hooks unit is the most updated part of this new release. This unit is the responsible of hook some of the UxTheme and WinApi methods like DrawThemeBackground, GetSysColor and GetSysColorBrush. Which allows take the control of the painting process for the system themed (and owner-draw) controls.
ListView
This new release fix the highlight color used on the selected items and also replace the themed checkBox by a styled checkbox.
ListView with VCL Styles + Vcl.Styles.Hooks unit
Also was added support for style the Listview groups.
ListView with VCL Styles
ListView with VCL Styles + Vcl.Styles.Hooks unit
DateTime Controls
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 (for more information read these TMonthCalendar and TDatetimepicker ) also only the newest versions of Delphi includes a partial styling support for such components. With this new release the styling of these controls is now possible.
TDateTimePicker and TMonthCalendar with VCL Styles
TDateTimePicker and TMonthCalendar with VCL Styles + Vcl.Styles.Hooks unit
ProgressBar
Improved support for the TProgressbar component without flicker and with Marquee style.
Select Directory Dialog
The styling for the select directory dialog was enhanced adding support for the open and close glyphs and fixing the color of the highlight bar.
VCL Styles Utils
VCL Styles Utils + Vcl.Styles.Hooks unit
Open/Save Dialog
The VCL Styles support of the Open and Save dialogs was improved adding styling for groups and highlight items. Also a fix for the select folder combobox was introduced.
VCL Styles Utils
VCL Styles Utils + Vcl.Styles.Hooks unit
Pingback: TDateTimePicker Win 8.1 - Delphi-PRAXiS
November 5, 2014 at 6:24 am
Hello, when i try to add vcl.styles.hooks and vcl.styles.utils to a project I get exception in the system.generics.collections unit. function TDictionary.GetItem(const key : TKey): TValue The error is Item not found.
If I remove your two units and just style as normal all works fine. Any ideas?
November 5, 2014 at 11:22 am
Thanks for the feedback, you can report this using the issue page of the project, attaching a sample project to reproduce the issue.
November 5, 2014 at 11:22 am
@Steve: Do you use Project options -> Delphi Compiler -> Compiling -> Runtime errors -> Overflow checking / Range checking?
November 5, 2014 at 10:53 am
Rodrigo, you are my hero!
You find a way to style the ListView Group Header!
That’s sooo great!!!
But I found one issue with the background drawing of the calendar.
The hot items (days) remain selected painted.
Please replace in Vcl.Styles.Hooks.pas function Detour_UxTheme_DrawThemeMain line 587 this code with the following code with local canvas to clear the background:
{ old version
MC_BACKGROUND,
MC_BORDERS,
MC_GRIDBACKGROUND : begin
SaveIndex := SaveDC(hdc);
try
LDetails:=StyleServices.GetElementDetails(teBackgroundNormal);
StyleServices.DrawElement(hdc, LDetails, pRect, nil);
finally
RestoreDC(hdc, SaveIndex);
end;
Result:=S_OK;
end;”
}
MC_BACKGROUND,
MC_BORDERS,
MC_GRIDBACKGROUND :
begin
SaveIndex := SaveDC(hdc);
LCanvas := TCanvas.Create;
try
LCanvas.Handle := hdc;
LCanvas.Brush.Color := StyleServices.GetStyleColor(scGenericBackground);
LCanvas.FillRect(pRect);
LDetails := StyleServices.GetElementDetails(teBackgroundNormal);
StyleServices.DrawElement(hdc, LDetails, pRect, nil);
finally
LCanvas.Handle := 0;
LCanvas.Free;
RestoreDC(hdc, SaveIndex);
end;
Result := S_OK;
end;
November 5, 2014 at 11:23 am
Thanks, I but can’t reproduce which you describe. please use the issue page of the project to report this.
November 6, 2014 at 6:08 am
see issue 94!
Pingback: VCL Styles Utils – Major Update (Dialogs,...
November 11, 2014 at 4:26 pm
Can this be used with Delphi XE7 Starter Edition?
I tried but will not compile due cannot find StyleUtils.inc StylesAPI.inc.
November 11, 2014 at 4:52 pm
Try modifyng the Vcl.Styles.Ext unit, comment the line 26 {$DEFINE USE_VCL_STYLESAPI}.
November 12, 2014 at 12:30 am
No luck.
Tried compiling Basic Demo.
First Error:
[dcc32 Error] Vcl.Styles.Utils.pas(42): E2003 Undeclared identifier: ‘TCustomStyleExt’
November 12, 2014 at 11:31 am
The TCustomStyleExt component and the Vcl.Styles.Utils unit only can be used if you have the source code of the VCL Styles. but you can use all the other features of the library with the Starter Edition.
November 13, 2014 at 2:30 am
So what do I do with the class TVclStylesUtils which has a TCustomStyleExt field?
November 14, 2014 at 10:58 pm
Hi Bob, I just edited my original answer (sorry for that), the Vcl.Styles.Utils unit cannot be used in the starter edition, but this is just a very small part of the library.
November 15, 2014 at 12:11 am
OK. Thanks for your replies.
November 26, 2014 at 8:22 am
Can you apply styles to TTreeView Delphi component?
November 26, 2014 at 11:50 am
Yes, the TTreeView control is supported by the VCL Styles.
December 19, 2014 at 11:11 am
Hi Rodrigo,,
How to excluding “Title bar” from VCL style?
Thanks :)
December 19, 2014 at 11:53 am
Try this https://theroadtodelphi.wordpress.com/2012/02/07/disabling-the-vcl-styles-in-the-non-client-area-of-a-form/
December 20, 2014 at 12:22 am
You save my life!
Thank you very much :-)