Sign in to follow this  

Enable XP Themes in Windows.

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

"There's been a lot written about how to integrate your application with Windows XP themes, most of it complete hogwash. I've personally wasted hours trying to figure out how to get it working."

XD Thanks.

Err... Yeah... Isn't that for .NET? and VC++ express won't let me add resources =(

Share this post


Link to post
Share on other sites
If i put the following manifest file in the same filder as my application the program won't run...


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

Share this post


Link to post
Share on other sites
It's actualy very very very easy. You will need VC++ so you can make use of resource files. Just hit ctrl+r then select "Custom" then for the type enter "24" and hit enter. Then rename the resource to "1". Open up the file it creates ("default.bin", you can change this, I usualy do to "xptheme.bin") and copy and past the following in it:

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



then save the file. At the very beginning of your WinMain add the following code:


INITCOMMONCONTROLSEX ICC;

ZeroMemory(&ICC,sizeof(INITCOMMONCONTROLSEX));

ICC.dwSize=sizeof(INITCOMMONCONTROLSEX);
ICC.dwICC=ICC_BAR_CLASSES|ICC_HOTKEY_CLASS|ICC_LISTVIEW_CLASSES|ICC_PROGRESS_CLASS|ICC_TAB_CLASSES; //this is just copied and pasted, you can change this to whatever it is you need

if (InitCommonControlsEx(&ICC)==FALSE)
{
return 0;
}



Also you'll need to include commctrl.h and link the comctl32.lib library to your project. Maybe it's just a coincidence but I've found that if I don't do that (the above code and including/linking) the program silently crashes immediately after the window is created.

This is the only method I've gotten to work, and it works wonderfuly for me.

Share this post


Link to post
Share on other sites
BungoMan85's method is for embedding the manifest as a resource in your executable. I'm inclined to say that if your manifest file won't work when it's a separate file, embedding it won't help any (although stranger things have happened).

Unfortunately, near as I can tell, BungoMan85's manifest file is the same as yours (save the assemblyIdentity tag). Actually, that may be the problem.. check that the manifest file's version info matches your exe exactly.

Share this post


Link to post
Share on other sites

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this