Re: How to create an MFC application with XP look?
David Lowndes wrote:
I had heard about not using common control manifest in non-Unicode
builds but I did not know why before. Surely this would not be hard for
MS to fix?
You'd think so wouldn't you - but the will didn't seem to be there to
do it.
As far as I'm aware the only problem was something very specific
(EM_GETHANDLE message returns a buffer of WCHAR), and many
applications wouldn't have come across it - though I recall it does
show up if you use an MFC CEditView.
As it is, this could be the last nail in the coffin of doing ANSI-builds
for Win9x compatibility. What happens with MSLU? Same problem I would
have thought.
It won't be an issue on other OS's since it only affected the V6
common controls (XP/2003 only - until Vista).
Also, does this problem only show if you use non-ASCII characters in an
edit control?
It isn't related to the character set at all.
After I learned about external manifests, I went crazy and
made a common control manifest for the VC6 application itself (yes,
still using VC6 for MFC projects...). VC6 must be an ANSI build
application, but it seems to work fine in my US-centric world.
You can still circumvent the Unicode only thing in VS2005 if you edit
the condition in the resource file. If you test your application and
don't find any issues you are probably safe - but you can't say it's a
"supported" MS scenario.
Dave
Thanks, Dave.
Of course you are right about MSLU (I confused myself for a moment --
often happens). Actually MSLU IS a solution to this problem.
Certainly I have used VC6 with manifest under XP with themes for several
months now, and I have seen no problem.
In my ongoing major rewrite of my aplications I have converted to
unicode build and will either use MSLU or (more likely) abandon Win9x.
But I need to make a (hopefully final) release of my current versions
(which are non-Unicode builds) to accommodate 64-bit and/or Vista.
Mostly move to a different installer, and make sure UAC is not causing
problems on Vista. But I was thinking also of adding a common control
manifest for XP themes. I don't use CEditView, but now I am nervous of
doing this.
What do you mean by "edit the condition in the resource file"? What
condition? And where did you learn this stuff? I looked on Google but
didn't find the "definitive discussion".
David Wilkinson