Print Page | Close Window

can;t get manifest in VS2005 to make XP themes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6495
Printed Date: 20 July 2025 at 6:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: can;t get manifest in VS2005 to make XP themes
Posted By: MichaelN
Subject: can;t get manifest in VS2005 to make XP themes
Date Posted: 22 February 2007 at 1:56pm
I know, I know, this question probably has been asked a hundred times, but I wonder if there is something in the Xtreme ToolkitPro code that can prevent XP themes from enabling?

I have moved our app from VS6 + XTK 10.3.1  to  VS2005/SP1 + XTK 10.4.2. In VS6, using XTK 10.3.1, I did the resource "24" embeffing thing and the XP themes worked. But now it doesn't.

I can make a simple VS2005 project and it shows the theme. But our old app does not show it. I cannot, for the life of me, get this to work.I have looked at all the obvious things, including comparing the property pages between a basic app that shows themes and our app which is now not showing them. No success.

Is there a blueprint somewhere that shows step by step how to get XP themes under VS2005 + XTK ?

Michael



Replies:
Posted By: rmercer
Date Posted: 22 February 2007 at 2:59pm
Originally posted by MichaelN MichaelN wrote:

Is there a blueprint somewhere that shows step by step how to get XP themes under VS2005 + XTK ?

Michael
Copy the manifest file to the "res" folder of your project, rename it to the executable name + ".manifest".  If your executable name is "MyProgram.exe", then it would be "MyProgram.exe.manifest".  Obviously you should edit the manifest file to match your program details...  I always use the same manifest file between all my applications and just change the assemblyIdentity.name and description tags.  Probably not the best way, but it works. 
 
Add this to your project, then recompile.  It should automatically link it in and you'll get your XP look and feel.


Posted By: MichaelN
Date Posted: 22 February 2007 at 3:05pm
Thanks. That's the drill I went through under VS6 and it worked. Perhaps what is confusing me is that VS2005 has nanifest capability out of the box.---it creates a manifest and automatically embeds it. That is what it does for for the simple tes App that I created, adn it worked. So I'm letting VS2005 do the manifest its own way for our big App too. Is that the problem?

I could certainly disable the manifest creation and embedding on the VS2005  property pages, and then do it manually as you say. To be clear, Is that what you are telling me to do??

MichaelN


Posted By: MichaelN
Date Posted: 22 February 2007 at 4:55pm

OK, I did exactly what you say. Now when I start the debugger, I get an exception immediately, telling me it can't find MFC80D.DLL. Huh? I've been around this again and again. What's missing?

Michael




Posted By: Oleg
Date Posted: 23 February 2007 at 1:05am
Hi,
With vc2005 don't use manifest file at all but add to stdafx.h:
 
#if (_MSC_VER > 1310) // VS2005
#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


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: MichaelN
Date Posted: 23 February 2007 at 11:01am
That did it! Thank you Oleg!  I was almost there. I had compared and copied everything from the Test App that I had created, including the same code-block you showed me. But there was one difference that I did not see. The test app had compiled as UNICODE, so it had your code enclosed by  #ifdef _UNICODE ..... #endif  Since my target App is not unicode, this was not being seen by the compiler. I just didn;t catch it and this is why I was pulling out all my hair all week trying to make it work. You opened my eyes.

Thans again for your great help.

Michael



Posted By: Kurisu
Date Posted: 07 July 2007 at 5:49pm
Found your technique quite helpful!  Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net