Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a manifest embedded as a resource? (Windows XP/Vista-style controls)

I have a manifest embedded as a Windows resource. But what's the right way to apply it?

More specifically:

I have my .manifest file. It's the standard one to make an app use controls in the Windows XP/Vista visual style. When applied by being in the same directory as the .exe and suitably named, it works.

However, this approach is rather cumbersome. I'd like my .exe to be self-contained. Clearly it can be done, given that many of the apps on my computer manage to use the modern style without a separate manifest file.

So I had a look around, and finally found embedding the manifest as a resource. So I've added this line to my .rc file:

1 RT_MANIFEST "mdiedit.exe.manifest"

But what do I do next?

Edit: If it helps you to know, my program is written in D and built using the Digital Mars D and resource compilers. No IDE. But I'd expect any solution that works in C(++), when built using command-line tools, to work in D as well.

like image 317
Stewart Avatar asked Dec 30 '22 15:12

Stewart


1 Answers

RT_MANIFEST is a define, so make sure your resource file includes the correct header, or just replace RT_MANIFEST with 24

like image 140
Anders Avatar answered Jan 13 '23 15:01

Anders