The TUxThemeStyle.GetEnabled function (Like Mike Lichke's code it came from) misktanely thinks that using Version 6 of the ComCtrl32.dll is related to themes being enabled.
The ability to use Visual Styles is independant of whether we are using version 6 of the Common Controls library:
it is perfectly valid to use the ThemeAPI while depending on version 5 of the Common Controls Library
conversely, it is valid to use version 6 of the Common Controls library, but not have Visual Styles applied to the application.
The correct way to not use visual styles in the application is to add an entry to your application's manifest:
tl;dr: Theming enabled is what determines if themes are enabled. Theming is still enabled even if i'm using CommonControlsV5.
The Fix
Vcl.Themes.pas:
function TUxThemeStyle.GetEnabled: Boolean;
begin
//WRONG:
//Result := FAvailable and FUseThemes and FNewComCtrls;
Result := FAvailable and FUseThemes; // and FNewComCtrls; themes being enabled has nothing to do with the use of new common controls.
end;
Tested
Background
The TUxThemeStyle.GetEnabled function (Like Mike Lichke's code it came from) misktanely thinks that using Version 6 of the ComCtrl32.dll is related to themes being enabled.
The ability to use Visual Styles is independant of whether we are using version 6 of the Common Controls library:
The correct way to not use visual styles in the application is to add an entry to your application's manifest:
tl;dr: Theming enabled is what determines if themes are enabled. Theming is still enabled even if i'm using CommonControlsV5.
The Fix
Vcl.Themes.pas: