Jump to content
  • Advertisement
Sign in to follow this  
Axiverse

Enable XP Themes in Windows.

This topic is 5040 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

Advertisement
"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
P.S. Programs with even the default manifest file generated by the C++ Express Manifest Program won't run on my computer? Is there something wrong with my Windows XP?

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!