[Setup] AppName=My Application AppVersion=1.5 DefaultDirName={pf}\My Application [Tasks] Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; Name: associate; Description: "Associate files"; GroupDescription: "Additional icons:"; Flags: unchecked [Code] { Sets the mouse capture to the specified window belonging to the current thread } function SetCapture( hWnd: HWND ): HWND; external 'SetCapture@user32.dll stdcall'; var { Global variables } szDesc: TNewStaticText; procedure RedesignWizardForm; begin { Init global variable szDesc } szDesc := TNewStaticText.Create( nil ); with szDesc do begin Parent := WizardForm.SelectTasksPage; SetBounds( ScaleX( 0 ), ScaleY( 184 ), ScaleX( 417 ), ScaleY( 45 ) ); AutoSize := False; WordWrap := True; end; end; procedure ItemMouseMove( Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea ); begin if ( Index = - 1 ) then { If current index - 1, then } begin szDesc.Caption := ''; { Set caption on mouse leave } SetCapture( 0 ); { Set handle on 0 } Exit; { Exit from procedure } end; case TNewCheckListBox( Sender ).ItemCaption[Index] of { Treatment tasklist } 'Create a &desktop icon': szDesc.Caption := 'Создает ярлык программы на рабочем столе'; { Get item index of item caption } 'Associate files': szDesc.Caption := 'Ассоциирует поддерживаемые форматы с программой'; end; SetCapture( TNewCheckListBox( Sender ).Handle ); { Set handle on tasklist } end; procedure InitializeWizard(); begin RedesignWizardForm; WizardForm.TasksList.OnItemMouseMove := @ItemMouseMove; { Call ItemMouseMove procedure } end; |