delphi - 在 Inno Setup 向导中显示 Delphi Form
问题描述
我在 DLL 中有一个 Delphi 表单,我想在 Inno 设置的向导页面中显示它。我正在关注这个问题的一个例子:
如何将 DLL 中的表单嵌入到 Inno Setup 向导页面中?
我使用这些代码行来导出我的 Delphi 表单:
procedure CreateWizardForm(ParentWnd: HWND);stdcall;
var
R: TRect;
Form: TOpenSQLServerForm;// the from i want to show
begin
Form := TOpenSQLServerForm.Create(nil);
Form.ParentWindow := ParentWnd;
Form.BorderStyle := bsNone;
GetWindowRect(ParentWnd, R);
Form.BoundsRect := R;
Form.Show;
end;
在图书馆我有:
library LoadServerName;
uses
Winapi.Windows,System.SysUtils, System.Classes, VCL.Forms,VCl.dialogs,
OpenSQLServer in 'OpenSQLServer.pas' {OpenSQLServerForm};
{$R *.res}
exports
CreateWizardForm;
begin
end.
最后,我以这种方式在 Inno Setup 中使用我的 DLL:
procedure CreateWizardForm(ParentWnd:HWND);stdcall;
external 'CreateWizardForm@files:LoadServerName.dll stdcall';
procedure InitializeWizard();
begin
CustomPage := CreateCustomPage(wpSelectDir, 'Caption', 'Description');
CreateWizardForm(CustomPage.surface.Handle);
end;
当我运行 Inno Setup 时,我希望在 CustomPage 中看到我的向导表单,但它根本没有显示我的表单。有什么问题?
解决方案
推荐阅读
- r - 是否可以在 R 包之间共享 C++ 类?
- html - 如何使用渐变 CSS 使图像变暗一半?
- javascript - Summer-note 在引导模式中不起作用(从视图中加载模式内容)
- python - 如何为 OCR 制作 REST API
- python - Python/Pandas 新手:重新分配给新变量时,对数据框进行了不必要的更改
- php - 如果发布时文件中的匹配,PHP删除数组元素
- java - 将对象转换为 Long 时使用 mapstruct 未映射的目标属性
- angular - 访问 JBOSS 7 中的角度路径导致 404 Not Found
- jinja2 - 有没有办法删除 jinja2 for 循环中的空行?
- java - 为什么 java.net.URI 不解析权限部分?