在 Delphi 的 runetime 中导入特定的(在我的例子中 - Themes.ThemesService.ThemesEnabled )函数/过程
我认为主题说明了一切......
我只需要这个方法。如果我只需要该单元(主题)中的一种方法,则无需浪费大约 6Mb 的包含单元...
我正在考虑 UxTheme 单元,但它不包含正确的功能。我需要导入什么Windows DLL以及这个方法代表什么API函数?
谢谢。
PS 问题不仅旨在涵盖此特定方法,还涵盖其他方法,因为我需要在 MSXML 和 MM 单元中执行相同的操作...
I think subject tells everything ...
I need this method only. No need to waste about 6Mb of included unit if only thing I need is one method from that unit ( Themes ) ...
I was thinking of UxTheme unit, but it did not contain proper function. What Windows DLL do I need to import and what API function this method stands for?
Thanks.
P.S. Question is intended to cover not only this particular method, but others too as I will need to do same in MSXML and MM units ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@HX_unbanned,显然你有点困惑。因为将主题单元添加到项目中只会增加 exe 的大小,大约为 321 kb。无论如何,如果您想手动检查您的应用程序是否有主题(themesEnabled),您必须按照以下步骤操作。
1) 检查 comctl32.dll 库的版本(必须是主要或等于 6)
2) 加载 uxtheme.dll 库
3) 导入
IsThemeActive
和IsAppThemed
函数。4)检查这些函数的值(两者都必须为真)
检查此示例
@HX_unbanned, apparently you're a little confused. because adding the themes unit to your project only increment the size of the exe in 321 kb aprox. anyway if you want to check if you application is themed (themesEnabled) manually you must follow the next steps.
1) check the version of the comctl32.dll library (must be major or equal to 6)
2) load the uxtheme.dll library
3) import the
IsThemeActive
andIsAppThemed
functions.4) check the values of theses functions (both must be true)
check this sample