开发者

An XP style combobox in a DLL

开发者 https://www.devze.com 2023-03-27 03:17 出处:网络
I need to create a combobox with an XP style IN a DLL with C++ and WIN32 API (no MFC). I managed to create the control in the DLL开发者_如何学Go (by not in XP style).

I need to create a combobox with an XP style IN a DLL with C++ and WIN32 API (no MFC). I managed to create the control in the DLL开发者_如何学Go (by not in XP style). I managed to create XP style combobox in an exe with manifest, but it does not work in the DLL.


In order for your DLL to load comctl v6 (the DLL that provides "XP-themed" versions of the common controls) without relying on its hosting process to have the appropriate manifest, you need to make your DLL isolation-aware.

Either use the C++ class described here in MSDN, or try #defining ISOLATION_AWARE_ENABLED=1.


In order to force your control to use XP themed rendering regardless if it's enabled in a manifest or not you will need to use visual styles API. This is available on XP and above and provides support for rendering most common controls. More information on using the API can be found here.

0

精彩评论

暂无评论...
验证码 换一张
取 消