Автор: braunberg
Дата сообщения: 27.06.2008 11:23
		AlexDJ666  
 Сплеш устроит при клике по картинке? [more=скрипт] 
 [Setup] 
 AppName=My Program 
 AppVerName=My Program version 1.5 
 DefaultDirName={pf}\My Program 
  
 [Files] 
 Source: AdvSplash.dll; DestDir: {tmp}; Flags: dontcopy 
 Source: callnsis.dll; DestDir: {tmp}; Flags: dontcopy 
 Source: compiler:WizModernSmallImage.bmp; DestDir: {tmp}; Flags: dontcopy 
 Source: compiler:WizModernImage.bmp; DestDir: {tmp}; Flags: dontcopy 
 Source: compiler:WizModernSmallImage-IS.bmp; DestDir: {tmp}; Flags: dontcopy 
 Source: compiler:WizModernImage-IS.bmp; DestDir: {tmp}; Flags: dontcopy 
  
 [Code] 
 var 
   Page: TWizardPage; 
   P1,P2: TPanel; 
   Image1,Image2: TBitmapImage; 
   L1,L2: TLabel; 
  
 procedure callplug(parentwnd: Integer; pluginname,funcname,param1,param2,param3,param4,param5,param6,param7,param8,param9,param10: PChar); 
  external 'callplug@files:callnsis.dll stdcall'; 
  
 ////////// Delay=3000; FadeIn=50; FadeOut=0; Transparent=-1 (время в милисекундах, прозрачность не используется) 
  
 procedure OnClick1(Sender: TObject); 
 begin 
   ExtractTemporaryFile('WizModernImage.bmp') 
   ExtractTemporaryFile('AdvSplash.dll') 
   callplug(0,ExpandConstant('{tmp}\AdvSplash.dll'),'show','3000','50','0','-1',ExpandConstant('{tmp}\WizModernImage'),'','','','','') 
 end; 
  
 procedure OnClick2(Sender: TObject); 
 begin 
   ExtractTemporaryFile('WizModernImage-IS.bmp') 
   ExtractTemporaryFile('AdvSplash.dll') 
   callplug(0,ExpandConstant('{tmp}\AdvSplash.dll'),'show','3000','50','0','-1',ExpandConstant('{tmp}\WizModernImage-IS'),'','','','','') 
 end; 
  
 procedure InitializeWizard(); 
 begin 
 Page:=CreateCustomPage(2, 'Выбор компонентов установки', 'Просмотрите описание компонентов, которые вы хотите установить.') 
  
   ExtractTemporaryFile('WizModernSmallImage.bmp'); 
   ExtractTemporaryFile('WizModernSmallImage-IS.bmp'); 
  
   P1:=TPanel.Create(Page) 
   P1.SetBounds(0,0,55,55) 
   P1.Enabled:=False 
   P1.Parent:=Page.Surface; 
  
   P2:=TPanel.Create(Page) 
   P2.SetBounds(0,P1.Height+10,55,55) 
   P2.Enabled:=False 
   P2.Parent:=Page.Surface; 
  
   Image1:=TBitmapImage.Create(Page); 
   Image1.SetBounds(0,0,55,55); 
   Image1.Bitmap.LoadfromFile(ExpandConstant('{tmp}\WizModernSmallImage.bmp')); 
   Image1.Parent:=P1; 
  
   Image2:=TBitmapImage.Create(Page); 
   Image2.SetBounds(0,0,55,55); 
   Image2.Bitmap.LoadfromFile(ExpandConstant('{tmp}\WizModernSmallImage-IS.bmp')); 
   Image2.Parent:=P2; 
  
   L1:=TLabel.Create(Page) 
   L1.SetBounds(P1.Left,P1.Top,P1.Width + 2,P1.Height) 
   L1.AutoSize:=False 
   L1.Transparent:=True 
   L1.OnClick:=@OnClick1 
   L1.Cursor:=crHand 
   L1.Parent:=P1.Parent 
  
   L2:=TLabel.Create(Page) 
   L2.SetBounds(P2.Left,P2.Top,P2.Width + 2,P2.Height) 
   L2.AutoSize:=False 
   L2.Transparent:=True 
   L2.OnClick:=@OnClick2 
   L2.Cursor:=crHand 
   L2.Parent:=P2.Parent 
 end; 
 [/more]