IE 中的 ActiveX。 对话框不显示 XP 视觉样式

发布于 2024-07-08 06:05:10 字数 110 浏览 6 评论 0原文

我在 IE (7) 中有一个 ActiveX 控件。 当它显示一个对话框时,该对话框不会以 XP 视觉样式显示。 我尝试过嵌入清单但无济于事。 有人知道吗? 顺便说一下,对话框是使用wtl 实现的。

I have an ActiveX control in IE (7). When it shows a dialog box, the dialog box is not showing in XP visual style. I have tried embedding manifests to no avail. Anybody got any idea? by the way, the dialog boxes were implemented using wtl.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

幽梦紫曦~ 2024-07-15 06:05:11

使用 #define ISOLATION_AWARE_ENABLED 1 构建 dll。
或者放置编译器指令 /D ISOLATION_AWARE_ENABLED=1。
不要忘记清单应嵌入 id 2。

更多信息请参见:http://msdn.microsoft.com/en-us/library/aa815321%28VS.85%29.aspx#_slate_set_the_isolation_aware_enabled_directive

顺便说一句,使用这些设置构建的 ActiveX 显示的对话框将被换肤即使该 ActiveX 嵌入到没有清单的情况下构建的可执行文件中。

Build your dll with #define ISOLATION_AWARE_ENABLED 1.
Or put compiler directive /D ISOLATION_AWARE_ENABLED=1.
Don't forget manifest should be embedded with id 2.

More info here: http://msdn.microsoft.com/en-us/library/aa815321%28VS.85%29.aspx#_slate_set_the_isolation_aware_enabled_directive

BTW, dialog shown from ActiveX built with these settings will be skinned even if that ActiveX is embedded into executable built without manifest.

爱*していゐ 2024-07-15 06:05:11

您可能想在代码项目上尝试为 WTL 对话框换肤

You might want to try Skinning a WTL dialog over on Code Project.

杀お生予夺 2024-07-15 06:05:11

我认为发生这种情况是因为 IE 正在读取通过 COM 公开的控件,而 .NET 使用它自己的方法从清单文件中读取。

尝试在加载表单之前调用 Application.EnableVisualStyles。 这对我有用。

I think this happens as a result of the fact that IE is reading the control exposed through COM while .NET uses it's own apprach where it reads from a manifest file.

Try calling Application.EnableVisualStyles before the form loads. That worked for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文