NightW0lf
Full Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Код: [Setup] WindowVisible=no [Files] Source: "x:\License.rtf"; DestDir: {tmp}; Flags: dontcopy noencryption Source: "other_files"; DestDir: {tmp}; Source: C:\1.jpg; DestDir: {tmp}; Flags: dontcopy Source: C:\2.jpg; DestDir: {tmp}; Flags: dontcopy Source: C:\3.jpg; DestDir: {tmp}; Flags: dontcopy Source: C:\4.jpg; DestDir: {tmp}; Flags: dontcopy Source: C:\Fon.bmp; DestDir: {tmp}; Flags: dontcopy [Code] const BACKGROUND = 6; // "5"-по центру, "6"-растянуто на весь экран, "1,2,3,4"-в разных углах экрана TIMER = 16; function isxbb_AddImage(Image: PChar; Flags: Cardinal): Integer; external 'isxbb_AddImage@files:isxbb.dll stdcall'; function isxbb_Init(hWnd: Integer): Integer; external 'isxbb_Init@files:isxbb.dll stdcall'; function isxbb_StartTimer(Seconds: Integer; Flags: Cardinal): Integer; external 'isxbb_StartTimer@files:isxbb.dll stdcall'; function isxbb_KillTimer(Flags: Cardinal): Integer; external 'isxbb_KillTimer@files:isxbb.dll stdcall'; function GetSystemMetrics(nIndex: Integer): Integer; external 'GetSystemMetrics@user32.dll stdcall'; procedure InitializeWizard(); var BackgroundBitmapImage: TBitmapImage; s: string; License: string; width, height: Integer; begin {********************Для корректного отображения заголовков**********} WizardForm.Position := poScreenCenter; //Добавленно мною {********************Для корректного отображения заголовков**********} MainForm.BORDERSTYLE := bsNone; {********************Для корректного отображения rtf файлов**********} //Добавленно мною ExtractTemporaryFile('License.rtf'); LoadStringFromFile(ExpandConstant('{tmp}') + '\License.rtf', License) WizardForm.LicenseMemo.RTFText := License; {********************Для корректного отображения rtf файлов**********} //Добавленно мною width := GetSystemMetrics(0); height := GetSystemMetrics(1); MainForm.Width := width; MainForm.Height := height; width := MainForm.ClientWidth; height := MainForm.ClientHeight; ExtractTemporaryFile('Fon.bmp'); s := ExpandConstant('{tmp}') + '\Fon.bmp'; BackgroundBitmapImage := TBitmapImage.Create(MainForm); BackgroundBitmapImage.Bitmap.LoadFromFile(s); BackgroundBitmapImage.Left := 0; BackgroundBitmapImage.Top := 0; BackgroundBitmapImage.Width := width; BackgroundBitmapImage.Height := height; BackgroundBitmapImage.Parent := MainForm; BackgroundBitmapImage.Stretch := True; MainForm.Visible := True; end; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssInstall then begin ExtractTemporaryFile('1.jpg'); //это файлы для слайд-шоу, их может быть и больше ExtractTemporaryFile('2.jpg'); ExtractTemporaryFile('3.jpg'); isxbb_AddImage(ExpandConstant('{tmp}') + '\1.jpg', BACKGROUND or TIMER); isxbb_AddImage(ExpandConstant('{tmp}') + '\2.jpg', BACKGROUND or TIMER); isxbb_AddImage(ExpandConstant('{tmp}') + '\3.jpg', BACKGROUND or TIMER); isxbb_Init(StrToInt(ExpandConstant('{hwnd}'))); isxbb_StartTimer(3, BACKGROUND) //это таймер для слайд-шоу в секундах end else if CurStep = ssPostInstall then isxbb_KillTimer(BACKGROUND); end; | | Всего записей: 479 | Зарегистр. 08-11-2006 | Отправлено: 16:01 19-01-2007 | Исправлено: NightW0lf, 16:08 19-01-2007 |
|