MFC Visual Studio 2010 Dialogs: Aero Style?

Currently, my MFC dialog looks like from Windows 98. Is there a way to get it to use the active style of Windows 7 (aero)?

(I am using C ++)

+6
windows-7 visual-studio-2010 mfc
source share
3 answers

Try adding this to Stdafx.h

#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_IA64 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' 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 
+14
source share

You need a manifest in the application with the theme and make sure that you execute InitCommonControlsEx ().

Also pay attention to the MFC function package, also below is a link to examples:

+3
source share

Make sure you add a valid manifest to your application.

0
source share

All Articles