Reputation: 29267
I am referring to this answer How to enable visual styles without a manifest
Doing what that answers says creates a .manifest
and visual styles are enabled. However I don't want the manifest to be bounded with my .exe - I am delivering only my executable and would like everything bundled in there.
Is there a way to enable visual styles without manifest or maybe through embedding the manifest inside the executable itself?
Upvotes: 1
Views: 1846
Reputation: 941217
Use mt.exe to embed the manifest into the executable as a resource. This is a standard part of the build since VS2005, use a project template if you have trouble setting it up properly.
Upvotes: 5
Reputation: 43311
Add this to the end of stdafx.h file:
#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
Upvotes: 2