[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Code ]
{"00000407" Немецкий
"00000409" Английский
"0000040C" Французский
"0000040D" Финский
"00000410" Итальянский
"00000415" Польский
"00000419" Русский
"00000422" Украинский
"00000423" Белорусский
"00000425" Эстонский
"00000426" Латвийский
"00000427" Литовский}
const
KLF_ACTIVATE = 1;
function LoadKeyboardLayout(pwszKLID : string; Flags : Uint) : LongInt;
external 'LoadKeyboardLayoutW@user32.dll stdcall';
var
Button : TButton;
Edit : TEdit;
procedure TestClick(Sender : TObject);
begin
case TButton(Sender).Tag of
0: begin
TButton(Sender).Tag := 1;
TButton(Sender).Caption := 'En';
LoadKeyboardLayout('00000419', KLF_ACTIVATE); //рус
end;
1: begin
TButton(Sender).Tag := 0;
TButton(Sender).Caption := 'Ru';
LoadKeyboardLayout('00000409', KLF_ACTIVATE); //англ
end;
end;
end;
procedure InitializeWizard;
begin
with WizardForm do begin
OuterNotebook.Hide;
end;
Button := TButton.Create(WizardForm);
with Button do begin
Parent := WizardForm;
SetBounds(ScaleX(100), ScaleY(250), ScaleX(100), ScaleY(25));
Caption := 'Ru';
OnClick := @TestClick;
end;
Edit := TEdit.Create(WizardForm);
with Edit do begin
Parent := WizardForm;
SetBounds(ScaleX(10), ScaleY(100), ScaleX(400), ScaleY(25));
end;
end;