问题
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. 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. For example:
http://fs2.filegir.com/cuttlas/setup.exe
回答1:
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. 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.
The link you have posted in not the standard Inno Setup. Note the "5.5.1*.ee2**"* in their log file. They have probably modified Inno Setup significantly. Note how, when (in Windows 10) you hover mouse over their preview window, the wizard window stays visible (and other windows blur). While with standard Inno Setup, all windows blur, including the wizard. This is because their taskbar button in linked to the wizard window. While in standard Inno Setup, it's not.
回答2:
I have found a great library to solve this:
https://mega.co.nz/#F!RcQkhSxI!_ZsnpdapAeoVVWEgVw2iMQ
using WinTB v2.0
you can easily turn on the preview on the Taskbar:
#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:
[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;
来源:https://stackoverflow.com/questions/64060208/inno-setup-window-preview-in-taskbar