I'm updating a VS6 MFC dialog application to VS2008. Updating the code has been easy, but the dialog still has the old fashioned VS6 appearance to it. For example, the Group Boxes have square edges and are dark grey. Instead of the rounded corners and light grey of a VS2008 application Group Box.
How can I force my application to use the more m开发者_JAVA技巧odern appearance of VS2008 MFC dialog applications?
A new MFC project will add the following to stdafx.h:
// Define manifest directives to match platform
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
I also add the following to my projects to explictedly link to the UXTHEME.LIB which sub-classes basic controls to add theme support:
#ifdef _UXTHEME_H_
#pragma message( "Including uxtheme.lib for linking" )
#pragma comment(lib, "uxtheme.lib")
#endif
精彩评论