Adil
Старожил
Всем привет. Вчера пытался загрузить изображение в созданный new check list box. Все никак не получается. Где я ошибся?
Код:
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
SolidCompression=yes
Compression=lzma/ultra
PrivilegesRequired=none
OutputDir=.
///BitmapResource=WizardImage:BGImage.bmp
[Files]
Source: "BGImage.bmp"; Flags: dontcopy solidbreak
[code]
var
BGBitmapImage,BTNImage: TBitmapImage;
BorderWidth: Integer;
BGImageStream,BTNImageStream: TMemoryStream;
NewCheckListBox1: TNewCheckListBox;
procedure RedesignWizardForm;
begin
BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BGImage.bmp', BGImageStream);
BGImageStream.Position := 0;
BGBitmapImage := TBitmapImage.Create(WizardForm);
BGBitmapImage.Bitmap.LoadFromStream(BGImageStream);
WizardForm.Bevel.Hide;
WizardForm.OuterNotebook.Hide;
NewCheckListBox1 := TNewCheckListBox.Create(WizardForm);
with NewCheckListBox1 do
begin
Parent := WizardForm;
Left := ScaleX(248);
Top := ScaleY(176);
Width := ScaleX(209);
Height := ScaleY(105);
LoadBGBmpFromBitmap(BGBitmapImage.Bitmap, ScaleX(0), ScaleY(0));
end;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
end;