I have a problem with loading VCL Styles for Inno Setup. The installer generates correctly, but still remains an old style. New styles will not load.
I do not understand why this is happening. Please help!
Here my iss code:
[Files]
...
; add library to create new styles
Source: "VclStylesinno.dll"; DestDir: {app}; Flags: dontcopy
Source: "Styles/Pink.vsf"; DestDir: {app}; Flags: dontcopy
[Code]
// Import the LoadVCLStyle function from VclStylesInno.DLL
procedure LoadVCLStyle(VClStyleFile: String);
external 'LoadVCLStyleW@files:VclStylesInno.dll stdcall';
// Import the UnLoadVCLStyles function from VclStylesInno.DLL
procedure UnLoadVCLStyles;
external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Pink.vsf');
LoadVCLStyle(ExpandConstant('Pink.vsf'));
Result := True;
end;