嵌入在dll中的VCL风格? [英] VCL-Styles embedded in dll?

查看:151
本文介绍了嵌入在dll中的VCL风格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Delphi XE2 VCL风格嵌入到dll中?应用程序 - 外观页面在DLL项目的项目设置中不可见。

How do I embed Delphi XE2 VCL-Styles in a dll? The Application - Appearance page is not visible in project settings for DLL-projects.

我尝试在包含在$ R伪指令中的rc文件中定义它们,但是有一个更好的方式我想知道。

I tried defining them in a rc-file included with a $R directive which works but if there is a better way I'd like to know.

RC文件示例:

GOLDENGRAPHITE VCLSTYLE "C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\Redist\styles\vcl\GoldenGraphite.vsf"
CARBON VCLSTYLE "C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\Redist\styles\vcl\Carbon.vsf"

特别是要指定XE2安装文件夹的完整路径是我想要避免的。

In particular having to specify the full path to XE2-installation folder is something I want to avoid.

推荐答案

另一个选项,你可以使用

Another options which you can use

1)使用资源对话框。

1) Using the Resource dialog.

2)编辑您的dll的dproj文件

2) Editing the dproj file of your dll

在此密钥< PropertyGroup Condition =' $(Base)'!=''>

添加一个条目 VCL_Custom_Styles for vcl style

Add one Entry VCL_Custom_Styles for the vcl styles

<VCL_Custom_Styles>&quot;Amakrits|VCLSTYLE|$(PUBLIC)\Documents\RAD Studio\9.0\Styles\Amakrits.vsf&quot;;&quot;Amethyst Kamri|VCLSTYLE|$(PUBLIC)\Documents\RAD Studio\9.0\Styles\AmethystKamri.vsf&quot;;&quot;Aqua Graphite|VCLSTYLE|$(PUBLIC)\Documents\RAD Studio\9.0\Styles\AquaGraphite.vsf&quot;</VCL_Custom_Styles>

这篇关于嵌入在dll中的VCL风格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆