Setup Programs created using Inno Setup Compiler doesn't display Minimize Animation

偶尔善良 提交于 2019-12-06 15:24:44

问题


My Problem is why Inno Setup Compiler (Unicode or ANSI) and any Setups made by it don't minimize showing a nice Minimizing Animation like in Other Windows Programs?

It displays a very basic Minimize Animation..........Why that?

I know Borland Delphi as Inno Setup Compiler's Compiler, but Borland Delphi doesn't have such a bad Minimize Animation...........It minimizes normally as Windows System Windows minimize (such as Explorer, Computer, Control Panel).................

I also noticed that the Windows Installer Creater Nullsoft Scriptable Install System - NSIS and Setups made using it are also minimizing well like I said.

How can I resolve this problem?

UPDATED QUESTION

I also added a code to play that nice Zooming Minimize / Restore Animation can be seen in Many Windows Applications on Inno Setup's WizardForm, But when I click the WizardForm's Minimize Button after adding this code to Inno Setup Compiler's Source Code, the Nice Zooming animation not plays and it never can be minimized using it, it only can be minimized using Taskbar button after adding this code. So it means this code not working or anything else wrong...........Why this is not working???

The Code I Added to unit WizardForm:

interface

uses
  Windows;

type
  TTrayZoom = class(TObject)
  private
    class function GetTrayRect: TRect;
    class procedure DoZoom(const Wnd: HWND; const Src, Dest: TRect);
  public
    class procedure ZoomToTray(const Wnd: HWND);
    class procedure ZoomFromTray(const Wnd: HWND);
  end;

implementation

class procedure TTrayZoom.DoZoom(const Wnd: HWND; const Src, Dest: TRect);
begin
  DrawAnimatedRects(Wnd, IDANI_CAPTION, Src, Dest);
end;

class function TTrayZoom.GetTrayRect: TRect;
var
  TaskbarWnd, TrayWnd: HWND;
begin
  TaskbarWnd := FindWindow('Shell_TrayWnd', nil);
  TrayWnd := FindWindowEx(TaskbarWnd, 0, 'TrayNotifyWnd', nil);
  GetWindowRect(TrayWnd, Result);
end;

class procedure TTrayZoom.ZoomFromTray(const Wnd: HWND);
var
  WndRect: TRect;
begin
  GetWindowRect(Wnd, WndRect);
  DoZoom(Wnd, GetTrayRect, WndRect);
end;

class procedure TTrayZoom.ZoomToTray(const Wnd: HWND);
var
  WndRect: TRect;
begin
  GetWindowRect(Wnd, WndRect);
  DoZoom(Wnd, WndRect, GetTrayRect);
end;

And I called TTrayZoom.ZoomToTray from if WMSysCommand..... = SCMINIMIZE and called TTrayZoom.ZoomFromTray from if WMSysCommand..... = SCRESTORE with the setting HWND parameter to WizardForm.Handle.

But those codes never works, I even don't know if they're get called or not. :(

What is the problem playing this Zooming Animation in this WizardForm?


回答1:


I'd say there are two issues.

  1. The animation is shown for windows that have a task bar button. The wizard form does not have a task bar button.

    The task bar button of the installer belongs to a hidden main window.

    Historically the installers had full screen background gradient blue windows. Even Inno Setup supported that.

    While that background window is no longer enabled by default (the WindowVisible directive defaults to No in modern versions of Inno Setup), it still exists and owns the task bar button.

  2. Inno Setup is built using an ancient version of Delphi that likely does not play nicely with the minimize feature.

Generally, I'd say you should file a feature request/bug report to get this fixed.



来源:https://stackoverflow.com/questions/38411126/setup-programs-created-using-inno-setup-compiler-doesnt-display-minimize-animat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!