简体   繁体   English

任务栏中的 Inno Setup 窗口预览

[英]Inno Setup window preview in taskbar

All of the programs and opened files have a preview when you hover the mouse on their icons inside the taskbar.当您将鼠标悬停在任务栏中的图标上时,所有程序和打开的文件都有预览。

But for Inno Setup made installers it seems there is no preview.但是对于 Inno Setup 制作的安装程序,似乎没有预览。 Any fix or trick to solve this issue?任何修复或技巧来解决这个问题?

在此处输入图片说明

Though some game installers with custom design (which use Inno Setup) have a preview in the taskbar.虽然一些自定义设计的游戏安装程序(使用 Inno Setup)在任务栏中有预览。 For example:例如:
http://fs2.filegir.com/cuttlas/setup.exe http://fs2.filegir.com/cuttlas/setup.exe

I believe it's because the taskbar button is linked to an invisible internal window of Inno Setup and not to the visible wizard window.我相信这是因为任务栏按钮链接到 Inno Setup 的一个不可见的内部窗口,而不是链接到可见的向导窗口。 That also explains how it is possible that the taskbar button has a different title than the wizard window.这也解释了为什么任务栏按钮的标题可能与向导窗口的标题不同。 Note that those always match for the windows, where the preview works.请注意,这些总是与预览工作的窗口匹配。

Nothing you can do about it without modifying code of Inno Setup itself.如果不修改 Inno Setup 本身的代码,您将无能为力。

The link you have posted in not the standard Inno Setup.您发布的链接不是标准的 Inno Setup。 Note the "5.5.1 *.ee2**"* in their log file.请注意其日志文件中的“5.5.1 *.ee2**”*。 They have probably modified Inno Setup significantly.他们可能已经对 Inno Setup 进行了重大修改。 Note how, when (in Windows 10) you hover mouse over their preview window, the wizard window stays visible (and other windows blur).请注意,当(在 Windows 10 中)您将鼠标悬停在其预览窗口上时,向导窗口将保持可见(并且其他窗口模糊)。 While with standard Inno Setup, all windows blur, including the wizard.使用标准 Inno Setup 时,所有窗口都会模糊,包括向导。 This is because their taskbar button in linked to the wizard window.这是因为他们的任务栏按钮链接到向导窗口。 While in standard Inno Setup, it's not.在标准的 Inno Setup 中,它不是。

I have found a great library to solve this:我找到了一个很棒的库来解决这个问题:

https://mega.co.nz/#F!RcQkhSxI!_ZsnpdapAeoVVWEgVw2iMQ https://mega.co.nz/#F!RcQkhSxI!_ZsnpdapAeoVVWEgVw2iMQ

using WinTB v2.0 you can easily turn on the preview on the Taskbar:使用WinTB v2.0您可以轻松打开任务栏上的预览:

#include "WinTB.iss"

[Setup]
AppName=Wintb.dll example
AppVersion=2.0
DefaultDirName={pf}\Wintb.dll example
DefaultGroupName=Wintb.dll example
OutputDir=.

[files]
Source: wintb.dll; Flags: dontcopy;

[code]

procedure InitializeWizard();
begin
  ExtractTemporaryFile('wintb.dll');

  Win7TaskBar11(); 
end;

without any external plugin or dll, it can be solved by this trick:没有任何外部插件或dll,它可以通过这个技巧解决:

[Code]
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongW@user32.dll stdcall';
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall';
Function GetWindow (HWND: Longint; uCmd: cardinal): Longint;external 'GetWindow@user32.dll stdcall';

procedure InitializeWizard();
begin
SetWindowLong(WizardForm.Handle, -8,GetWindowLong(GetWindow(WizardForm.Handle, 4),-8));
end;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM