Question

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.

Was it helpful?

Solution

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

OTHER TIPS

Did you add the .rc file to your project yet? Alternatively, use your development environment's resource compiler, such as brcc32.exe or rc.exe, to compile the .rc file into a .res file, and then add that file to your project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top