[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={autopf}\My Application
PrivilegesRequired=none
WizardImageFile=compiler:WizModernImage-IS.bmp
OutputDir=userdocs:Inno Setup Examples Output
DisableWelcomePage=no
[Code]
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWind...@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWind...@user32.dll stdcall';
const
GWL_EXSTYLE = (-20);
WS_CLIPCHILDREN = $2000000;
WS_EX_TRANSPARENT = $20;
BS_CHECKBOX = $0002;
BS_OWNERDRAW = $000B;
BM_SETSTYLE = $00F4;
var
CheckListBox: TNewCheckListBox;
Style: Word;
procedure InitializeWizard();
begin
WizardForm.WizardBitmapImage.Align := alClient;
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
CheckListBox := TNewCheckListBox.Create(WizardForm);
Style := BS_CHECKBOX or BS_OWNERDRAW;
with CheckListBox do
begin
Left := ScaleX(50);
Top := ScaleY(50);
Width := ScaleY(300);
Height := ScaleY(200);
Anchors := [akLeft, akTop, akRight, akBottom];
Flat := True;
Parent := WizardForm.WizardBitmapImage.Parent;
AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
AddRadioButton('TNewCheckListBox', '', 1, True, True, nil);
AddRadioButton('TNewCheckListBox', '', 1, False, True, nil);
AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
AddCheckBox('TNewCheckListBox', '', 1, True, True, False, True, nil);
AddCheckBox('TNewCheckListBox', '', 2, True, True, False, True, nil);
AddCheckBox('TNewCheckListBox', '', 2, False, True, False, True, nil);
AddCheckBox('TNewCheckListBox', '', 1, False, True, False, True, nil);
SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_TRANSPARENT and not WS_CLIPCHILDREN);
SendMessage(Handle, BM_SETSTYLE, Style, 1);
Invalidate;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
WizardForm.NextButton.Hide;
WizardForm.CancelButton.Caption := 'Close';
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
end;