Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для A1EXXX

Старожил


Сообщения: 178
Благодарности: 67

Профиль | Отправить PM | Цитировать


Tukash, пробуй...
Код: Выделить весь код
const
   HALIGN_CENTER = 0;
   HALIGN_LEFT = 1;
   HALIGN_RIGHT = 2;

   VALIGN_CENTER = 0;
   VALIGN_TOP = 1;
   VALIGN_BOTTOM = 2;

   FIT_NONE = 0;
   FIT_WIDTH = 1;
   FIT_HEIGHT = 2;
   FIT_BOTH = 3;

   CLR_INVALID = $FFFFFFFF;

function InitGifCtrl(): Boolean;
external 'initgifctrl@files:gifctrl.dll stdcall';

function UninitGifCtrl(): Boolean;
external 'uninitgifctrl@files:gifctrl.dll stdcall';

function NewGifbWnd(hWndParent: HWND; X, Y, nWidth, nHeight: Integer): HWND;
external 'newgifwnd@files:gifctrl.dll stdcall';

function GifWndLoadFromFile(hWndGif: HWND; HAlign, VAlign: Integer; BGColor: DWord; Fit: integer; GifFileName: PChar): Boolean;
external 'gifwndloadfromfile@files:gifctrl.dll stdcall';

var
  GIF: HWND;
  WizardImage: TBitmapImage;
  WelcomeLabel1,WelcomeLabel2,FinishedHeadingLabel,
  FinishedLabel,PageNameLabel,PageDescriptionLabel: TLabel;

procedure DeinitializeSetup();
begin
// скрываем надписи
  WizardForm.WelcomeLabel1.Hide;
  WizardForm.WelcomeLabel2.Hide;
// загружаем на форму рисунок
  WizardForm.WizardBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\fon.bmp'));
// растягиваем рисунок по всей форме, если он у вас уже такой какой вы хотите, то удалите эту строку
  WizardForm.WizardBitmapImage.Align:=true;

// создаём надписи поверх рисунка
    WelcomeLabel1 := TLabel.Create(WizardForm);
    WelcomeLabel1.Left := 150;
    WelcomeLabel1.Top := 30;
    WelcomeLabel1.Width := 310;
    WelcomeLabel1.Height := 28;
    WelcomeLabel1.AutoSize := False;
    WelcomeLabel1.WordWrap := True;
    WelcomeLabel1.Font.Style := [fsBold];
    WelcomeLabel1.Font.Color := clBlack;
    WelcomeLabel1.Transparent := True;
    WelcomeLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
    WelcomeLabel1.Parent := WizardForm.WelcomePage;

  WelcomeLabel2:=TLabel.Create(WizardForm);
  WelcomeLabel2.Left := 150;
  WelcomeLabel2.Top := 70;
  WelcomeLabel2.Width := 310;
  WelcomeLabel2.Height := 200;
  WelcomeLabel2.AutoSize := False;
  WelcomeLabel2.WordWrap := True;
  WelcomeLabel2.Font.Color := clBlack;
  WelcomeLabel2.Transparent := True;
  WelcomeLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
  WelcomeLabel2.Parent := WizardForm.WelcomePage;
  UninitGifCtrl();
end;

procedure InitializeWizard();
begin
  ExtractTemporaryFile('fon.bmp')

    WizardForm.WelcomeLabel1.Hide;
    WizardForm.WelcomeLabel2.Hide;
    WizardForm.WizardBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\fon.bmp'));
    WizardForm.WizardBitmapImage.Align:=true;

  InitGifCtrl();
  GIF := NewGifbWnd(WizardForm.Handle, 10, 316, 140, 42);
  //GifWndLoadFromFile(GIF, HALIGN_CENTER, VALIGN_BOTTOM, CLR_INVALID, FIT_WIDTH, ExpandConstant('{tmp}\www_oszone_net.gif'));

    WelcomeLabel1 := TLabel.Create(WizardForm);
    WelcomeLabel1.Left := 150;
    WelcomeLabel1.Top := 30;
    WelcomeLabel1.Width := 310;
    WelcomeLabel1.Height := 28;
    WelcomeLabel1.AutoSize := False;
    WelcomeLabel1.WordWrap := True;
    WelcomeLabel1.Font.Style := [fsBold];
    WelcomeLabel1.Font.Color := clBlack;
    WelcomeLabel1.Transparent := True;
    WelcomeLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
    WelcomeLabel1.Parent := WizardForm.WelcomePage;

  WelcomeLabel2:=TLabel.Create(WizardForm);
  WelcomeLabel2.Left := 150;
  WelcomeLabel2.Top := 70;
  WelcomeLabel2.Width := 310;
  WelcomeLabel2.Height := 200;
  WelcomeLabel2.AutoSize := False;
  WelcomeLabel2.WordWrap := True;
  WelcomeLabel2.Font.Color := clBlack;
  WelcomeLabel2.Transparent := True;
  WelcomeLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
  WelcomeLabel2.Parent := WizardForm.WelcomePage;

  WizardForm.WelcomeLabel1.Hide;
  WizardForm.WelcomeLabel2.Hide;
  WizardForm.PageNameLabel.Hide;
  WizardForm.PageDescriptionLabel.Hide;
  WizardForm.FinishedHeadingLabel.Hide;
  WizardForm.FinishedLabel.Hide;

      WizardForm.WizardBitmapImage.Align:=true;
      WizardForm.WizardBitmapImage2.Align:=true;
      WizardForm.WizardSmallBitmapImage.Align:=true;

  WelcomeLabel1:=TLabel.Create(WizardForm);
  WelcomeLabel1.Left:=ScaleX(150);
  WelcomeLabel1.Top := ScaleY(15);
  WelcomeLabel1.Width := ScaleX(320);
  WelcomeLabel1.Height := ScaleY(75);
  WelcomeLabel1.AutoSize := False;
  WelcomeLabel1.WordWrap := True;
  WelcomeLabel1.Font.Color := clBlack;
// здесь можно поиграть шрифтом
//  WelcomeLabel1.Font.Style := [fsBold];
//  WelcomeLabel1.Font.Name:='MS Sans Serif';
  WelcomeLabel1.Font.Size := 14;
  WelcomeLabel1.Transparent := True;
  WelcomeLabel1.Parent := WizardForm.WelcomePage;

      WelcomeLabel2:=TLabel.Create(WizardForm);
      WelcomeLabel2.Left := ScaleX(150);
      WelcomeLabel2.Top := ScaleY(90);
      WelcomeLabel2.Width := ScaleX(320);
      WelcomeLabel2.Height := ScaleY(200);
      WelcomeLabel2.AutoSize := False;
      WelcomeLabel2.WordWrap := True;
      WelcomeLabel2.Font.Color := clBlack;
      WelcomeLabel2.Font.Size := 8;
      WelcomeLabel2.Transparent := True;
      WelcomeLabel2.Parent := WizardForm.WelcomePage;

  PageNameLabel := TLabel.Create(WizardForm);
  PageNameLabel.Left := ScaleX(25);
  PageNameLabel.Top := ScaleY(10);
  PageNameLabel.Width := ScaleX(300);
  PageNameLabel.Height := ScaleY(14);
  PageNameLabel.AutoSize := False;
  PageNameLabel.WordWrap := True;
  PageNameLabel.Font.Color := clBlack;
  PageNameLabel.Font.Style := [fsBold];
  PageNameLabel.Transparent := True;
  PageNameLabel.Parent := WizardForm.MainPanel;

      PageDescriptionLabel := TLabel.Create(WizardForm);
      PageDescriptionLabel.Left := ScaleX(40);
      PageDescriptionLabel.Top := ScaleY(25);
      PageDescriptionLabel.Width := ScaleX(475);
      PageDescriptionLabel.Height := ScaleY(30);
      PageDescriptionLabel.AutoSize := False;
      PageDescriptionLabel.WordWrap := True;
      PageDescriptionLabel.Font.Color := clBlack;
      PageDescriptionLabel.Transparent := True;
      PageDescriptionLabel.Parent := WizardForm.MainPanel;

  FinishedHeadingLabel:=TLabel.Create(WizardForm);
  FinishedHeadingLabel.Left := ScaleX(150);
  FinishedHeadingLabel.Top := ScaleY(15);
  FinishedHeadingLabel.Width := ScaleX(320);
  FinishedHeadingLabel.Height := ScaleY(75);
  FinishedHeadingLabel.AutoSize := False;
  FinishedHeadingLabel.WordWrap := True;
  FinishedHeadingLabel.Font.Color := clBlack;
// здесь тоже можно поиграть шрифтом
//  FinishedHeadingLabel.Font.Style := [fsBold];
//  FinishedHeadingLabel.Font.Name:='MS Sans Serif';
  FinishedHeadingLabel.Font.Size := 14;
  FinishedHeadingLabel.Transparent := True;
  FinishedHeadingLabel.Parent := WizardForm.FinishedPage;

      FinishedLabel:=TLabel.Create(WizardForm);
      FinishedLabel.Left := ScaleX(150);
      FinishedLabel.Top := ScaleY(90);
      FinishedLabel.Width := ScaleX(320);
      FinishedLabel.Height := ScaleY(200);
      FinishedLabel.AutoSize := False;
      FinishedLabel.WordWrap := True;
      FinishedLabel.Font.Color := clBlack;
      FinishedLabel.Font.Size := 8;
      FinishedLabel.Transparent := True;
      FinishedLabel.Parent := WizardForm.FinishedPage;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  WelcomeLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
  WelcomeLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
  PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
  PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
  FinishedHeadingLabel.Caption := WizardForm.FinishedHeadingLabel.Caption;
  FinishedLabel.Caption := WizardForm.FinishedLabel.Caption;
end;
Это сообщение посчитали полезным следующие участники:

Отправлено: 20:22, 12-10-2009 | #226