36807

How to apply VCL Styles to DLL-based forms in Inno Setup?

I'm using Inno Setup (Unicode) with a set of DLL's that I'm writing in Delphi XE2. The DLL's have VCL forms which are shown during the installation wizard/progress.

I've tried out implementing VCL Styles in my Inno Setup installer. All is well, except for the forms which are created within these DLL's. Some of the form is skinned, but not all of it...

<img src="https://i.stack.imgur.com/k0Tvc.png" alt="Partial Skin">

As you can see, the form's background color, the list view background color, and the font color have changed. However, the list view headers, the progress bars, and the form's border are still the old style.

How can I make the forms in these DLL's show proper styles?

Answer1:

The VCL Styles plugin for Inno Setup is only designed to draw styles on the forms and controls in Inno Setup. In order to get the forms in these DLL's to be skinned, you need to export a function from the DLL that Inno Setup can pass in the filename...

<strong>Inno Setup</strong>

[Code] #define public VclStyleFile "Carbon (2).vsf" procedure DllLoadStyle(const StyleFilename: WideString); external 'DllLoadStyle@MyDLL.dll stdcall'; function InitializeSetup: Boolean; begin ExtractTemporaryFile('{#VclStyleFile}'); LoadVCLStyleW(ExpandConstant('{tmp}\{#VclStyleFile}')); DllInit; //Presumed your DLL needs to initialize / instantiate the form DllLoadStyle(ExpandConstant('{tmp}\{#VclStyleFile}')); ... end;

<strong>Delphi DLL</strong>

uses Vcl.Themes, procedure DllLoadStyle(const StyleFilename: WideString); stdcall; begin TStyleManager.SetStyle(TStyleManager.LoadFromFile(StyleFilename)) end; exports DllLoadStyle;

Recommend

  • Three.js keyframe animation
  • Postgresql left outer join on json array
  • How can I validate a date including “00:07 PM” in JavaScript?
  • Grow Animation for Floating Action Button
  • How to produce a Code 39 that can be reliably read after faxing
  • Help designing a order manager class
  • How do i install the cakephp forum plugin by Miles J?
  • Writing to same file at the very same time
  • Can statically compiled languages replace scripting language?
  • app_Offline.htm doesn't work for subfolders of my application in IIS
  • CSS Grid, position absolute an element in a css grid item: IMPOSSIBLE
  • How many Vertica Databases can run on a Host in the same time?
  • Highcharts - Column chart with empty columns for date in x-axis
  • How do you create a Fuseki SPARQL server using the Apache Jena Java API?
  • What is the use of a session store?
  • Javascript CORS - No 'Access-Control-Allow-Origin' header is present
  • Linq Merge lists
  • How can I speed up CURL tasks?
  • Content-Length header not returned from Pylons response
  • Google Custom Search with transparent background
  • Android fill_parent issue
  • Highlight and Bold text in JTextPane
  • NHibernate Validation Localization with S#arp Architecture
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Xamarin Forms - UWP Fonts
  • Spring Data JPA custom method causing PropertyReferenceException
  • Why ng-show works with ng-repeat but ng-if doesn't? [duplicate]
  • Excel - Autoshape get it's name from cell (value)
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • Change an a tag attribute in JavaScript based on screen width
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Unanticipated behavior
  • Cannot Parse HTML Data Using Android / JSOUP
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Getting Messege Twice Using IMvxMessenger
  • Android Google Maps API OnLocationChanged only called once
  • Can't mass-assign protected attributes when import data from csv file
  • Unable to use reactive element in my shiny app
  • How to load view controller without button in storyboard?
  • How do I use LINQ to get all the Items that have a particular SubItem?