Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphic error #35

Open
nizcoz opened this issue Jan 18, 2017 · 2 comments
Open

Graphic error #35

nizcoz opened this issue Jan 18, 2017 · 2 comments

Comments

@nizcoz
Copy link

nizcoz commented Jan 18, 2017

When i load any skin with inno setup i see this problem:

http://i65.tinypic.com/23iv045.png

I could not solve it by resizing the image

@RRUZ
Copy link
Owner

RRUZ commented Jan 19, 2017

Try attaching a sample script to reproduce your issue.

@nizcoz
Copy link
Author

nizcoz commented Jan 19, 2017

#define VCLStylesSkinPath "{localappdata}\VCLStylesSkin"

[Setup]
AppName=MyApp
AppVerName=MyApp
DefaultDirname={pf}\MyApp
WizardSmallImageFile=C:\Users\Nico\Documents\Inno\Script Inno\Image\small.bmp

[files]

Source: Styles\Skin.vsf; DestDir: {#VCLStylesSkinPath}; Flags: uninsneveruninstall
Source: Styles\VclStyles.dll; DestDir: {#VCLStylesSkinPath}; Flags: uninsneveruninstall

[code]
// Import the LoadVCLStyle function from VclStylesInno.DLL
procedure LoadVCLStyle(VClStyleFile: String); external 'LoadVCLStyleW@files:VclStyles.dll stdcall setuponly';
procedure LoadVCLStyle_UnInstall(VClStyleFile: String); external 'LoadVCLStyleW@{#VCLStylesSkinPath}\VclStyles.dll stdcall uninstallonly';
// Import the UnLoadVCLStyles function from VclStylesInno.DLL
procedure UnLoadVCLStyles; external 'UnLoadVCLStyles@files:VclStyles.dll stdcall setuponly';
procedure UnLoadVCLStyles_UnInstall; external 'UnLoadVCLStyles@{#VCLStylesSkinPath}\VclStyles.dll stdcall uninstallonly';

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('skin.vsf');
LoadVCLStyle(ExpandConstant('{tmp}\skin.vsf'));
Result := True;

end;

var
PageNameLabel, PageDescriptionLabel: TLabel;

procedure InitializeWizard();
begin
WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);

PageNameLabel:= TLabel.Create(WizardForm)
with WizardForm.PageNameLabel do
PageNameLabel.SetBounds(Left, Top, Width, Height);
PageNameLabel.Transparent:= True;
PageNameLabel.Font:= WizardForm.PageNameLabel.Font;
PageNameLabel.Font.Color:= clWhite; //цвет надписи
PageNameLabel.Parent:= WizardForm.MainPanel;

PageDescriptionLabel:= TLabel.Create(WizardForm)
with WizardForm.PageDescriptionLabel do
PageDescriptionLabel.SetBounds(Left, Top, Width, Height);
PageDescriptionLabel.Transparent:= True;
PageDescriptionLabel.Font:= WizardForm.PageDescriptionLabel.Font;
PageDescriptionLabel.Font.Color:= clWhite; //цвет надписи
PageDescriptionLabel.Parent:= WizardForm.MainPanel;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption:= WizardForm.PageDescriptionLabel.Caption;
end;

procedure DeinitializeSetup();
begin

UnLoadVCLStyles;
end;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants