问题描述
我在DLL中有一个Delphi表单,我想在Inno安装程序的“向导”页面中显示它。我正在从这个问题中追踪一个例子:
How to embed a form from a DLL into an Inno Setup wizard page?
我使用以下代码行导出我的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中看到我的向导表单,但是它根本没有显示我的表单。有什么问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)