在Inno Setup窗口中打开外部程序

内幕人士

我有一些Exe格式的动画,我需要将它们加载到Inno Setup的面板中。

我发现了有关Delphi的这些信息:
http : //www.delphipages.com/forum/archive/index.php/t-200729.html
如何使用Shell封装到另一个应用程序并使其以Delphi形式出现

如何在Inno Setup中实施此类操作?

马丁·普里克里(Martin Prikryl)

Inno Setup的等效代码如下:

[Code]

function SetParent(hWndChild: HWND; hWndNewParent: HWND): HWND;
  external '[email protected] stdcall';
function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL;
  external '[email protected] 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;

在此处输入图片说明


尽管我建议您不要这样做。这是不可靠的破解。在安装程序本身中按Pascal代码显示图像。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章