Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » [Inno Setup]Проблемы при компиляции.

Модерирует : gyra, Maz

gyra (08-08-2017 10:00): http://forum.ru-board.com/topic.cgi?forum=5&topic=46338#1  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

LeonOfficial

Newbie
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Здравствуйте, я впервые общаюсь с данной программой и при первой же компиляции мне выдаёт ошибку: "Line 51: Column: 76 Unknown Type 'TItemArea' ", - помогите пожалуйста.  
Сам код:
 
type
  TComponentDesc = record
    Description: String;
    ImageName: String;
    Index: Integer;
  end;
 
var
  CompDescs: array of TComponentDesc;
  CompDescPanel, CompDescImgPanel: TPanel;
  CompDescText: array[1..2] of TLabel;
  CompIndex, LastIndex: Integer;
  CompDescImg: TBitmapImage;
 
procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var
  i: Integer;
begin
  if Index = LastIndex then Exit;
  CompIndex := -1;
  for i := 0 to GetArrayLength(CompDescs) -1 do
  begin
    if (CompDescs[i].Index = Index) then
    begin
      CompIndex := i;
      Break;
    end;
  end;
  if (CompIndex >= 0) and (Area = iaItem) then
  begin
    if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then
      ExtractTemporaryFile(CompDescs[CompIndex].ImageName);
    CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);
    CompDescImg.Show;
 
    CompDescText[2].Caption := CompDescs[CompIndex].Description;
    CompDescText[2].Enabled := True;
  end else
  begin
    CompDescText[2].Caption := CustomMessage('ComponentsInfo');
    CompDescText[2].Enabled := False;
    CompDescImg.Hide;
  end;
  LastIndex := Index;
end;
 
procedure CompListMouseLeave(Sender: TObject);
begin
  CompDescImg.Hide;
  CompDescText[2].Caption := CustomMessage('ComponentsInfo');
  CompDescText[2].Enabled := False;
  LastIndex := -1;
end;
 
procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);
var
  i: Integer;
begin
  i := GetArrayLength(CompDescs);
  SetArrayLength(CompDescs, i + 1);
  CompDescs[i].Description := ADescription;
  CompDescs[i].ImageName := AImageName;
  CompDescs[i].Index := AIndex - 1
end;
 
procedure InitializeWizard();
begin
  WizardForm.SelectComponentsLabel.Hide;
  WizardForm.TypesCombo.Hide;
  WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205)); //растягиваем окно компоненты
  WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
  WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;
 
  CompDescImgPanel := TPanel.Create(WizardForm);
  with CompDescImgPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));   //растягиваем ширину и высотку превью
    BevelInner := bvLowered;
  end;
 
  CompDescText[1] := TLabel.Create(WizardForm);
  with CompDescText[1] do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));   // описание компонентов относительно края превью
    AutoSize := False;
    WordWrap := True;
    Enabled := False;
    Caption := CustomMessage('ComponentsImgInfo');
  end;
 
  CompDescImg := TBitmapImage.Create(WizardForm);
  with CompDescImg do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
    Stretch := True;
    Hide;
  end;
 
  CompDescPanel := TPanel.Create(WizardForm);
  with CompDescPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));
    BevelInner := bvLowered;
  end;
 
  CompDescText[2] := TLabel.Create(WizardForm);
  with CompDescText[2] do
  begin
    Parent := CompDescPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));
    AutoSize := False;
    WordWrap := True;
    Enabled := False;
    Caption := CustomMessage('ComponentsInfo');
  end;
    AddCompDescription(1, CustomMessage ('Description1'), 'dust2.bmp');
    AddCompDescription(2, CustomMessage ('Description2'), 'cache.bmp');
    AddCompDescription(3, CustomMessage ('Description3'), 'inferno.bmp');
    AddCompDescription(4, CustomMessage ('Description4'), 'mirage.bmp');
    AddCompDescription(5, CustomMessage ('Description5'), 'cbble.bmp');
    AddCompDescription(6, CustomMessage ('Description6'), 'overpass.bmp');
    AddCompDescription(7, CustomMessage ('Description7'), 'italy.bmp');
    AddCompDescription(8, CustomMessage ('Description8'), 'train.bmp');
    AddCompDescription(9, CustomMessage ('Description9'), 'nuke.bmp');
end;
 
------
Inno Setup Compiler 5.5.9(u).

Всего записей: 3 | Зарегистр. 08-08-2017 | Отправлено: 09:44 08-08-2017
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » [Inno Setup]Проблемы при компиляции.
gyra (08-08-2017 10:00): http://forum.ru-board.com/topic.cgi?forum=5&topic=46338#1


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru