嵌入在dll中的VCL风格? [英] VCL-Styles embedded in dll?
问题描述
如何将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>"Amakrits|VCLSTYLE|$(PUBLIC)\Documents\RAD Studio\9.0\Styles\Amakrits.vsf";"Amethyst Kamri|VCLSTYLE|$(PUBLIC)\Documents\RAD Studio\9.0\Styles\AmethystKamri.vsf";"Aqua Graphite|VCLSTYLE|$(PUBLIC)\Documents\RAD Studio\9.0\Styles\AquaGraphite.vsf"</VCL_Custom_Styles>
这篇关于嵌入在dll中的VCL风格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!