2017-12-29 14 views
0

を右から制御ロールをアニメーション:Inno Setupの - 私は(InnoCallback DLLライブラリで)このコードを使用しようとしています確定ページに

[Code] 

var 
    MainPanelAnimated: Boolean; 
    AnimationTimer: LongWord; 

procedure AnimationTimerProc(
    H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord); 
var 
    L: Integer; 
begin 
    L := WizardForm.MainPanel.Left + ScaleX(5); 
    if L > 0 then 
    begin 
    L := 0; 
    KillTimer(0, AnimationTimer); 
    end; 
    WizardForm.MainPanel.Left := L; 
end; 

procedure CurPageChanged(CurPageID: Integer); 
var 
    HoverTimerCallback: LongWord; 
begin 
    if WizardForm.OuterNotebook.ActivePage = WizardForm.InnerPage then 
    begin 
    if not MainPanelAnimated then 
    begin 
     HoverTimerCallback := WrapTimerProc(@AnimationTimerProc, 4); 
     AnimationTimer := SetTimer(0, 0, 5, HoverTimerCallback); 
     WizardForm.MainPanel.Left := -WizardForm.MainPanel.Width; 
     MainPanelAnimated := True; 
    end; 
    end; 
end; 

How to animate a control roll out in Inno Setup(マーティンPrikrylの答え)から、表示するには同じ効果ですが、右から左へと設定の確定ページにあります。これを行う方法?

答えて

0

CurPageChangedCurPageIDを使用して、アニメーションを表示するページを選択します。

[Files] 
Source: InnoCallback.dll; Flags: dontcopy 

[Code] 

type 
    TTimerProc = procedure(H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord); 

function SetTimer(hWnd: longword; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): 
    LongWord; external '[email protected] stdcall'; 
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; 
    external '[email protected] stdcall'; 

function WrapTimerProc(Callback: TTimerProc; ParamCount: Integer): LongWord; 
    external '[email protected]:innocallback.dll stdcall'; 

var 
    AnimationTimer: LongWord; 

procedure AnimationTimerProc(
    H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord); 
var 
    L: Integer; 
begin 
    L := WizardForm.MainPanel.Left - ScaleX(5); 
    if L < 0 then 
    begin 
    L := 0; 
    KillTimer(0, AnimationTimer); 
    end; 
    WizardForm.MainPanel.Left := L; 
end; 

procedure CurPageChanged(CurPageID: Integer); 
var 
    HoverTimerCallback: LongWord; 
begin 
    if CurPageID = wpReady then 
    begin 
    HoverTimerCallback := WrapTimerProc(@AnimationTimerProc, 4); 
    AnimationTimer := SetTimer(0, 0, 5, HoverTimerCallback); 
    WizardForm.MainPanel.Left := WizardForm.MainPanel.Width; 
    end; 
end; 

コードにはInnoTools InnoCallback DLL libraryが使用されています。

関連する問題