WinTB

DLL WinTB 2.1

Нет прав для скачивания

omallygrace

Мимокрокодил
fixed.
Unlinked the library from msvcr100.dll.
Added SetupHandle (you need SetTaskBar * to work, just call it once at the very beginning of the whole code).
GetWindowLong(MainForm.Handle, -8) = Application.Handle
now works great without 'msvcr110.dll' dependency. tested on win 7 & 10 x86/x64

thank you very much
 
Последнее редактирование:

ffmla

Участник
WinTB library for inno setup based on David.D.Rocco's v 2.1
Код:
Wintb.dll v 0.2 (2020) From WinTB 2.1 by David.D.Rocco

;  -- msvcr1XX.dll needed for this,If you are a gamer{Installing MS VC++ runtime will fix this} Then all fine like original WinTB 2.1 by David.D.Rocco...!
;  -- Change log -- ;
;  -- SetupPreview added,
;  -- SetTaskBarProgressValue
;  -- SetTaskBarProgressState
;  -- SetTaskBarTitle
;  -- SetTaskBarThumbnailTooltip
;  -- SetTaskBarOverlayIcon

;  -- TaskBarAddButton
;  -- TaskBarCreateButtons
;  -- TaskBarButtonEnabled
;  -- TaskBarButtonToolTip
;  -- TaskBarButtonImage
;  -- Win7TaskBar10(),Win7TaskBar11(),Win7TaskBar12() & Win7TaskBar20() Removed.
;  -- Huge Thanks to David.D.Rocco,Krinkels & sergey3695.
 

Вложения

Ele

Новичок
WinTB plugin for Inno setup (39.5 kb) - Compiled with Delphi. :)


1.png
2.png
3.png



Код:
[Files]
Source: WinTB.dll; DestDir: {tmp}; Flags: dontcopy;

[Code]
// WinTB
const
  TBPF_NOPROGRESS    = $00000000;
  TBPF_INDETERMINATE = $00000001;
  TBPF_NORMAL        = $00000002;
  TBPF_ERROR         = $00000004;
  TBPF_PAUSED        = $00000008;

Procedure WinTBInit(FormHandle: Cardinal);  external 'WinTBInit@files:WinTB.dll stdcall delayload';
procedure WinTBSetProgressState(const AState: integer);  external 'WinTBSetProgressState@files:WinTB.dll stdcall delayload';
procedure WinTBSetProgressValue(const ACurrent, AMax: integer);  external 'WinTBSetProgressValue@files:WinTB.dll stdcall delayload';
procedure WinTBSetThumbnailTooltip(const AText: WideString); external 'WinTBSetThumbnailTooltip@files:WinTB.dll stdcall delayload';
procedure WinTBSetTitle(const ATitle: WideString); external 'WinTBSetTitle@files:WinTB.dll stdcall delayload';
#ifdef IS_ENHANCED
  procedure WinTBSetOverlayIcon(AHIcon: HICON); external 'WinTBSetOverlayIcon@files:WinTB.dll stdcall delayload';
#endif
procedure WinTBShutdown;  external 'WinTBShutdown@files:WinTB.dll stdcall delayload';
//

var
  NewProgressBar1: TNewProgressBar;
  NewButton1: TNewButton;
  Label1: TLabel;

procedure TestBtnClick(Sender: TObject);
var
  i: integer;
begin
  i:=0;

  // WinTB
  WinTBSetProgressState(TBPF_NORMAL);
  //

  while i <= 100 do
  begin
    // WinTB
    WinTBSetProgressValue(i, 100);
    //

    NewProgressBar1.Position:= i;
    Label1.Caption:= IntToStr(i) + '%';
    i:= i+1;
    #ifdef IS_ENHANCED
    Application.ProcessMessages;
    #endif
    Sleep(25);
  end;

  // WinTB
  WinTBSetProgressState(TBPF_NOPROGRESS);
  //
end;

procedure RedesignWizardForm;
begin
  NewProgressBar1 := TNewProgressBar.Create(WizardForm);
  with NewProgressBar1 do
  begin
    Parent := WizardForm;
    Left := ScaleX(30);
    Top := ScaleY(40);
    Width := ScaleX(350);
    Height := ScaleY(17);
    Min := 0;
    Max := 100;
  end;
  Label1 := TLabel.Create(WizardForm);
  with Label1 do
  begin
    Parent := WizardForm;
    AutoSize := True;
    Left := ScaleX(400);
    Top := ScaleY(42);
    Width := ScaleX(31);
    Height := ScaleY(13);
    Caption := '0%';
  end;
  NewButton1 := TNewButton.Create(WizardForm);
  with NewButton1 do
  begin
    Parent := WizardForm;
    Left := ScaleX(30);
    Top := ScaleY(100);
    Width := ScaleX(75);
    Height := ScaleY(25);
    Caption := 'Test Run';
    OnClick := @TestBtnClick;
  end;
end;

procedure InitializeWizard();
begin
  WizardForm.OuterNotebook.Visible:= False;
  WizardForm.ClientHeight := 200;
  RedesignWizardForm;

  // WinTB
  WinTBInit(MainForm.Handle);
  WinTBSetProgressState(TBPF_INDETERMINATE);
  WinTBSetThumbnailTooltip('Installing Hello world Test...');
  WinTBSetTitle('I am the title');
  //
end;

procedure DeinitializeSetup();
begin
  // WinTB
  WinTBShutdown;
  //
end;
 

Вложения

sergey3695

Ветеран
Модератор
3,5 кб
 
Последнее редактирование:

Ele

Новичок
3.5 kb
@sergey3695
Yes indeed. i agree. Delphi isn't so good as C++. But compared to other Delphi projects, this is a good size. :)
 

Ele

Новичок
WinTB plugin for Inno setup (39.5 kb) - Compiled in Delphi.
In the previous version, I forgot to add the "SetupPreview" function. :happy:
Here's the new Lib.
4.png
Код:
procedure WinTBSetupPreview(FormHandle: HWnd); external 'WinTBSetupPreview@files:WinTB.dll stdcall delayload';
 

Вложения

Сверху