我正在将 Inno Setup (Unicode) 与我在 Delphi XE2 中编写的一组 DLL 一起使用。 DLL 具有在安装向导/安装过程中显示的 VCL 形式。
我已经尝试过实施 VCL 样式 https://code.google.com/p/vcl-styles-utils/wiki/VCLStylesInnoSetup在我的 Inno Setup 安装程序中。一切都很好,除了在这些 DLL 中创建的表单之外。有些形式是蒙皮的,但不是全部......
正如您所看到的,表单的背景颜色、列表视图背景颜色和字体颜色都发生了变化。但是,列表视图标题、进度条和表单边框仍然是旧样式。
如何使这些 DLL 中的表单显示正确的样式?
Inno Setup 的 VCL Styles 插件仅设计用于在 Inno Setup 中的窗体和控件上绘制样式。为了让这些 DLL 中的表单换肤,您需要从 DLL 中导出一个函数,Inno Setup 可以在文件名中传递该函数...
创新设置
[Code]
#define public VclStyleFile "Carbon (2).vsf"
procedure DllLoadStyle(const StyleFilename: WideString);
external '[email protected] /cdn-cgi/l/email-protection stdcall';
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('{#VclStyleFile}');
LoadVCLStyleW(ExpandConstant('{tmp}\{#VclStyleFile}'));
DllInit; //Presumed your DLL needs to initialize / instantiate the form
DllLoadStyle(ExpandConstant('{tmp}\{#VclStyleFile}'));
...
end;
德尔福动态链接库
uses
Vcl.Themes,
procedure DllLoadStyle(const StyleFilename: WideString); stdcall;
begin
TStyleManager.SetStyle(TStyleManager.LoadFromFile(StyleFilename))
end;
exports
DllLoadStyle;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)