473,287 Members | 3,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Manifest files in resources

Hi,

I am interested in adding a manifest file to the resources for a MFC
application.

When I create an AppWizard MFC app with a manifest file it adds the
following lines to the .rc file:

#ifdef _UNICODE
IDR_MANIFEST RT_MANIFEST "res\\TestManifest4.manifest"
#endif

As you can see, the manifest is only included in Unicode builds.

There are some reports that this conditional code is due to problems with
non-Unicode apps and manifest files. For example this thread here:

http://tinyurl.com/3haut

Does anyone know if these reports are correct and, if they are, what bugs
could be caused by using a manifest file with an ANSI app. Also, I would be
interested to know if the problems (if there are any) occur with file based
manifest files or just those included in resources.

There also appears to be a related problem where Visual Studio will strip
out any mention of manifest files from the .rc file if these lines are
changed. For example in this thread:

http://tinyurl.com/yv49c

I am hitting this bug quite frequently. I have tried hiding the RT_MANIFEST
resource in the ifndef APSTUDIO_INVOKED section but it is still removed.

I am considering moving the RT_MANIFEST resource to a .rc2 file to
completely hide it from the IDE to stop this happening.

Before doing that, I would like to know if this behaviour is deliberate and
if any of it is, what bugs are Microsoft trying to hide / protect us from?
I don't want to put lots of work into this, just to hit some new bugs down
the line.

In case this post was too dull, here is the quick summary question: Is it
safe to put an RT_MANIFEST file into a .rc2 file to enable themes on Windows
XP for both Unicode and ANSI builds and are there any bugs in the
compiler/ide/operating system that may be caused by doing this (and are
their any bugs that would occur because the manifest file is in the
resources rather than in a file).

Thank you for taking the time to read this rather dull post,

Jonathan
Senior Software Engineer
Serif (Europe) Ltd
Nov 17 '05 #1
3 3198
>There are some reports that this conditional code is due to problems with
non-Unicode apps and manifest files. For example this thread here:

http://tinyurl.com/3haut

Does anyone know if these reports are correct and, if they are, what bugs
could be caused by using a manifest file with an ANSI app.
Jonathan,

They're correct as far as I'm aware. The problem is plainly visible in
an MFC application that uses a CEditView. The root problem is that
EM_GETHANDLE message returns a buffer of WCHAR (rather than char), but
other than that, I'm not aware of other ANSI only issues.
Also, I would be
interested to know if the problems (if there are any) occur with file based
manifest files or just those included in resources.
The problem is the use of the newer (V6) common controls, so it's
irrelevant of how you use the manifest.
I am considering moving the RT_MANIFEST resource to a .rc2 file to
completely hide it from the IDE to stop this happening.

Before doing that, I would like to know if this behaviour is deliberate and
if any of it is, what bugs are Microsoft trying to hide / protect us from?
Dunno.
I don't want to put lots of work into this, just to hit some new bugs down
the line.


I think a lot of people will have used manifests in ANSI builds and
not experienced any problems - but all you can do is try it with your
application and test it thoroughly. The issue in question didn't
become publicly visible for quite some time after XP's release.

Dave
Nov 17 '05 #2
Thank you for your reply and the info about EM_GETHANDLE.

I don't think this bug will affect us. The only thing I am still confuesd
about is why Microsoft felt it was necessary to disable themes on
non-Unicode builds just for this bug (it doesn't seem that bad as I would
imagine that CEditView windows arn't that widly used).

I think I will just try and hide the RT_MANIFEST resource so the resource
edit can't delete it and see how things go.

Jonathan

"David Lowndes" <da****@example.invalid> wrote in message
news:ml********************************@4ax.com...
There are some reports that this conditional code is due to problems with
non-Unicode apps and manifest files. For example this thread here:

http://tinyurl.com/3haut

Does anyone know if these reports are correct and, if they are, what bugs
could be caused by using a manifest file with an ANSI app.
Jonathan,

They're correct as far as I'm aware. The problem is plainly visible in
an MFC application that uses a CEditView. The root problem is that
EM_GETHANDLE message returns a buffer of WCHAR (rather than char), but
other than that, I'm not aware of other ANSI only issues.
Also, I would be
interested to know if the problems (if there are any) occur with file basedmanifest files or just those included in resources.


The problem is the use of the newer (V6) common controls, so it's
irrelevant of how you use the manifest.
I am considering moving the RT_MANIFEST resource to a .rc2 file to
completely hide it from the IDE to stop this happening.

Before doing that, I would like to know if this behaviour is deliberate andif any of it is, what bugs are Microsoft trying to hide / protect us from?
Dunno.
I don't want to put lots of work into this, just to hit some new bugs

downthe line.


I think a lot of people will have used manifests in ANSI builds and
not experienced any problems - but all you can do is try it with your
application and test it thoroughly. The issue in question didn't
become publicly visible for quite some time after XP's release.

Dave

Nov 17 '05 #3
"Jonathan Payne" <jp****@NOSPAM.serif.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you for your reply and the info about EM_GETHANDLE.

I don't think this bug will affect us. The only thing I am still confuesd
about is why Microsoft felt it was necessary to disable themes on
non-Unicode builds just for this bug (it doesn't seem that bad as I would
imagine that CEditView windows arn't that widly used).


I think MS position is/was that the V6 common controls are internally
UNICODE and should therefore only be used in UNICODE apps. Period.
--
Jeff Partch [VC++ MVP]

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Merak | last post by:
I usually embed a XML manifest with my applications to have them support XP Visual Styles. I know I can embed the resource into the resources section of the compiled executable (under the type...
1
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
1
by: Steve Klett | last post by:
Hi- I added some files from 1 web application to another, during my initial build, i get this error: Resources 'error.aspx.resx' and 'Modules\Error.ascx.resx' have the same manifest resource...
3
by: Tom wilson | last post by:
Resources 'Beneficiary.aspx.resx' and 'OveraAge.aspx.resx' have the same manifest resource name 'Enroll.Beneficiary.resources'. Umm... what's this mean? The first two are aspx page resource...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
11
by: RossettoeCioccolato | last post by:
Is there any way to coax the VC8 linker into generating an application manifest with a trust level section suitable for an administrative application? Or do I have to add this manually each time...
14
by: _iycrd | last post by:
After several frustrating attempts to wrap a native DLL w a C++/CLI DLL, I finally got an assembly to compile, only to find a *runtime* error. The app comes up fine. Test dialog displays. ...
4
by: =?Utf-8?B?UkQ=?= | last post by:
I'm working on migrating my VC++ 6.0 project to VS C++ 2005 and I'm bulding the project using NMAKE from the command line. The code is not GUI, all console utilities and services. I've managed to...
1
by: JB | last post by:
I'm working on an asp site and i am getting the following error:# "No resources were found in the manifest. Did you mark your content to be compiled as resource?" "PresntLocations=" then a list ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.