Re: Multi-Byte Application with XP Theme



Hi AliR,

Same here!

I've just found this workaround:

1 - Remove the default embedded manifest; to do so, in the VS2008 IDE go
into :

Project Properties | Configuration Properties | Manifest Tool | Input and
Output

and set "Embed Manifest" to "No".

2 - Manually edit the manifest file, adding explicitly the dependency to
Common Controls v.6 of Windows XP.
To do that, add this XML node entry into manifest file:

<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>

This node must be put into the main root <assembly> node.

This is an example of complete manifest file:

---[ sample manifest ]---

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"
uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>

<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>

<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT"
version="9.0.21022.8" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC"
version="9.0.21022.8" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

---[ end ] ---

(as you know, the manifest file is just an XML file, which you can edit with
a simple text editor).

Tha name of the manifest file is "YourApp.exe.manifest" (i.e.: your app full
name with .exe extension + ".manifest")

You must put the manifest in the same directory containing the exe.

This has worked for me (if you want, I can send you private email with .zip,
tomorrow [it's nighttime here]).

BTW: I don't understand why things that worked in VS2003 like this are now
broken in VS2008 and require manual hack... :(
I don't like that.

HTH,
Giovanni



"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> ha scritto nel messaggio
news:BzYzj.14845$0o7.10491@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Guys,

I have been searching the web for the solution to this problem but have
come up empty handed.

I'm writing a dialog based app in VS 2008, when I changed the project's
character set from Unicode to multi-byte I lost the XP theme. How can I
create a multi-byte application with XP Theme?

Thanks
AliR.




.



Relevant Pages

  • Re: How that is done?
    ... Add a manifest file to the VB98 directory that enables XP styles. ... which requires starting them with a Sub Main module and a compiled manifest file in your resource file. ...
    (microsoft.public.vb.general.discussion)
  • Re: VS2005 and manifest files
    ... VS2005 switches are set to create a manifest file and embed it into the ... I'm pretty sure that I can just turn these switches off and go back to my ... Embed the dependency in the manifest ...
    (microsoft.public.vc.language)
  • How can I run my application under win32 mode in a 64 bit XP?
    ... (But it will work after I manually set the ... following is the manifest file I use to compile my application ...
    (microsoft.public.win32.programmer.kernel)
  • Re: XP LOOK and crash
    ... Here is the manifest file which VS .net 2003 creates, ... Prev by Date: ...
    (microsoft.public.vc.mfc)
  • Re: MSJVM and msjava.dll for windows XP 64bit
    ... in the manifest file. ... with a 32 bit dependency to a common control for ... msjava.dll from dll walker. ... you only miss the vc runtime on the target machine you copied your ...
    (microsoft.public.dotnet.languages.vc)