2

I have some animations in Exe format, I need to load them inside a panel in Inno Setup.

I have found these about Delphi:
http://www.delphipages.com/forum/archive/index.php/t-200729.html
How to shell to another app and have it appear in a delphi form

How to implement such thing in Inno Setup?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Inside Man
  • 4,194
  • 12
  • 59
  • 119

1 Answers1

1

An equivalent code for Inno Setup will be like:

[Code]

function SetParent(hWndChild: HWND; hWndNewParent: HWND): HWND;
  external 'SetParent@User32.dll stdcall';
function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL;
  external 'ShowWindow@User32.dll stdcall';

procedure InitializeWizard();
var
  Page: TWizardPage;
  ResultCode: Integer;
  ProgHandle: HWND;
begin
  Page := CreateCustomPage(wpWelcome, 'Test', '');

  Exec('notepad.exe', '', '', SW_HIDE, ewNoWait, ResultCode);

  while ProgHandle = 0 do
    ProgHandle := FindWindowByWindowName('Untitled - Notepad');

  SetParent(ProgHandle, Page.Surface.Handle);
  ShowWindow(ProgHandle, SW_SHOWMAXIMIZED);
end;

enter image description here


Though I suggest you do not do this. It's an unreliable hack. Display the images by the Pascal Code in the installer itself.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992