![]() |
can;t get manifest in VS2005 to make XP themes |
Post Reply ![]() |
Author | |
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
rmercer ![]() Groupie ![]() Joined: 22 February 2006 Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() ![]() ![]() |
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Kurisu ![]() Newbie ![]() Joined: 28 February 2007 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Found your technique quite helpful! Thanks.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |