I am trying to create an image on a special page that I can get to display a user page or an image on a predefined page, but not on a user page.
The problem, I think, with Parent := CustomPage.ID; .
Parent := WizardForm.SelectTasksPage; works.
How to do it right?
procedure ImageOnClick(Sender: TObject); var ErrorCode: Integer; begin ShellExec('', 'http://test.com', '', '', SW_SHOW, ewNoWait, ErrorCode); end; var CustomPage: TWizardPage; BtnImage: TBitmapImage; procedure InitializeWizard; begin CustomPage := CreateCustomPage(wpLicense, 'Heading', 'Sub heading.'); ExtractTemporaryFile('image.bmp'); BtnImage := TBitmapImage.Create(WizardForm); with BtnImage do begin Parent := CustomPage.ID; Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\image.bmp'); AutoSize := True; Left := 90; Top := WizardForm.SelectTasksPage.Top + WizardForm.SelectTasksPage.Height - Height - 8; Cursor := crHand; OnClick := @ImageOnClick; end; end;
inno-setup
778899 Apr 29 '17 at 14:00 2017-04-29 14:00
source share