XP Look and feel to VC++ Dialog Applications

Posted: February 26, 2009 in VC++, Visual Studio, Windows, XP

Technology Business Directory - BTS Local

Welcome to the World of Creativeness. This is my first post.

In Visual Studio 2003, 2005 and later

Make sure you should add Common Control Manifest (in 4th Step, 6th check box) while creating a new project (VS 2005) if you unchecked this Common Control Manifest then you should manually add

//#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

to the end of Stdafx.h file
Make Sure #ifdef _UNICODE should be commmented also #endif at the end

In Visual Studio 6

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
 version="1.0.0.0"
 processorArchitecture="X86"
 name="ExeName"
 type="win32"
/>
<description>Application Description</description>
<dependency>
 <dependentAssembly>
 <assemblyIdentity
 type="win32"
 name="Microsoft.Windows.Common-Controls"
 version="6.0.0.0"
 processorArchitecture="X86"
 publicKeyToken="6595b64144ccf1df"
 language="*"
 />
 </dependentAssembly>
</dependency>
</assembly>

ExeName should be the name of your exe

Insert a custom resource from the resource menu as 24 and copy the above data to it. Save the file(Ctrl+ S)
Change it properties to 1.

Save, Compile and Run ……

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s