积极答复者
BHO中的窗口及控件为什么都没有视觉样式?

问题
-
如题?这个问题已经困扰我很长时间了,希望有哪位专家能帮忙告诉我如何解决?
我发现好像BHO会加载版本比较老的comctl32.dll库,而IE自身会加载比较新的库。
这些库都在WinSxS文件中的不同文件夹下,不知道有哪些因素可以影响这个库的加载,
什么加manifest文件,什么加一段
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
我试过了,似乎对BHO的DLL都没有用。
答案
-
是读的manifest。你可以在DLL中加一个manifest资源来替代默认的激活上下文,这也决定DLL加载的通用控件版本,影响DLL创建的窗口的视觉效果。具体步骤参考Office插件那篇文章。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 spyinsky 2011年6月22日 15:34
全部回复
-
How to apply Windows XP themes to Office COM add-ins
虽然是针对Office的,但是原理类似。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP -
每个DLL都可以提供自己的activation context,这个可以用来决定dll加载的是哪个版本的windows common control
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP -
是读的manifest。你可以在DLL中加一个manifest资源来替代默认的激活上下文,这也决定DLL加载的通用控件版本,影响DLL创建的窗口的视觉效果。具体步骤参考Office插件那篇文章。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 spyinsky 2011年6月22日 15:34