Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - can;t get manifest in VS2005 to make XP themes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

can;t get manifest in VS2005 to make XP themes

 Post Reply Post Reply
Author
Message
MichaelN View Drop Down
Senior Member
Senior Member


Joined: 19 September 2006
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote MichaelN Quote  Post ReplyReply Direct Link To This Post Topic: can;t get manifest in VS2005 to make XP themes
    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
Back to Top
rmercer View Drop Down
Groupie
Groupie


Joined: 22 February 2006
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmercer Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
MichaelN View Drop Down
Senior Member
Senior Member


Joined: 19 September 2006
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote MichaelN Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
MichaelN View Drop Down
Senior Member
Senior Member


Joined: 19 September 2006
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote MichaelN Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
MichaelN View Drop Down
Senior Member
Senior Member


Joined: 19 September 2006
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote MichaelN Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Kurisu View Drop Down
Newbie
Newbie


Joined: 28 February 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kurisu Quote  Post ReplyReply Direct Link To This Post Posted: 07 July 2007 at 5:49pm
Found your technique quite helpful!  Thanks.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.