473,385 Members | 2,210 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,385 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 3204
>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 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.