XP Visual Style in wxWidgets?

I would like to know if it is possible to enable XP Visual Style in wxWidgets as it is not enabled by default.

All controls were drawn in the classic Windows style.

I am using wxMSW packaged with wxPack but no wxFormBuilder ( http://wxpack.sourceforge.net/ ) and MSVC ++ 2008 EE as ide.

So, is it possible to enable XP Visual Style in wxWidgets applications?

+2


source to share


2 answers


Assuming wxWidgets - on windows - are simple wrappers around the respective Windows controls, to enable the new XP theme, you need to add a manifest to your project that lists the generic dll version 6 as a dependent assembly.

Visual Studio has a #pragma directive to allow programmers to easily inject dependencies into their manifests. Place the following in your cpp or header file.



#pragma comment(linker,"/manifestdependency:\"type='win32' "\
               "name='Microsoft.Windows.Common-Controls' "\
               "version='6.0.0.0' "\
               "processorArchitecture='x86' "\
               "publicKeyToken='6595b64144ccf1df' "\
               "language='*' "\
               "\"")

      

If you are using a different build environment, you need to follow these environment rules to generate the manifest file and add it as a resource to the exe file.

+4


source


Another possibility (which does not require a specific MSVC prime) is to #include "wx / msw / wx.rc" in your .rc file. (See http://www.wxwidgets.org/docs/faqmsw.htm#winxp )



+2


source







All Articles