From: Woody on
On Jan 18, 8:34 pm, "David Ching" <d...(a)remove-this.dcsoft.com> wrote:
> It was Giovanni who suggested Unicode.  While that is a good idea, it is not
> necessary to get the new style controls.  Could you just use AppWizard to
> quickly generate a temporary MFC application and see if the button is the
> new one?

That's what I did (what I meant by "your suggestion"). I used VS2005
to create a new MFC project, dialog-based, statically-linked. The only
determinant of whether it had the new-style controls was Unicode
libraries. Removing the InitCommonControlsEx code generated by the
Wizard didn't matter. Only Unicode, not 'Not set" or MBCS, produced
the new style. This makes no sense to me, but those are my results.
From: Giovanni Dicanio on
"Woody" <ols6000(a)sbcglobal.net> ha scritto nel messaggio
news:c4faaa28-6f46-4602-a7c3-67646f9b7191(a)14g2000yqp.googlegroups.com...

> Only Unicode, not 'Not set" or MBCS, produced
> the new style.

OK, this was what I recalled in my experience.

Being not interested in ANSI/MBCS builds anymore, I didn't investigate
further; I just built in Unicode.

However, if you really want ANSI/MBCS builds, you may want to try to add a
manifest file "by hand", following the suggestion found here in paragraph
"XP Themes":

http://www.catch22.net/tuts/tips2

(The above suggestions are for VC6, but I think you could try applying them
for VS2005 as well.)

HTH,
Giovanni



From: Giovanni Dicanio on
"David Ching" <dc(a)remove-this.dcsoft.com> ha scritto nel messaggio
news:OsuXkCMmKHA.2132(a)TK2MSFTNGP05.phx.gbl...

> It was Giovanni who suggested Unicode.

Thanks David :)

G


From: David Wilkinson on
Giovanni Dicanio wrote:
> However, if you really want ANSI/MBCS builds, you may want to try to add
> a manifest file "by hand", following the suggestion found here in
> paragraph "XP Themes":
>
> http://www.catch22.net/tuts/tips2
>
> (The above suggestions are for VC6, but I think you could try applying
> them for VS2005 as well.)

The reason that Common Control manifest is not implemented for MBCS builds is
that there is a bug in the version 6 common control that causes a crash in MFC
applications that use CEditView. Rather than fix this bug, Microsoft decided not
to add a Common Control section to the manifest for MBCS builds.

If you do not use CEditView, you can add the manifest by hand, as Giovanni suggests.

I don't have VS2005 installed, but in VS2008 there is a segment at the end of
stdafx.h that implements the common control entry in the manifest. Just remove the

#ifdef _UNICODE

from this segment.

--
David Wilkinson
Visual C++ MVP
From: Tom Serface on
Hi David,

I did not know that, but this is useful information and another reason for
always using Unicode for MFC applications these days ...

Tom

"David Wilkinson" <no-reply(a)effisols.com> wrote in message
news:e5g#5pPmKHA.2188(a)TK2MSFTNGP04.phx.gbl...
> Giovanni Dicanio wrote:
>> However, if you really want ANSI/MBCS builds, you may want to try to add
>> a manifest file "by hand", following the suggestion found here in
>> paragraph "XP Themes":
>>
>> http://www.catch22.net/tuts/tips2
>>
>> (The above suggestions are for VC6, but I think you could try applying
>> them for VS2005 as well.)
>
> The reason that Common Control manifest is not implemented for MBCS builds
> is
> that there is a bug in the version 6 common control that causes a crash in
> MFC
> applications that use CEditView. Rather than fix this bug, Microsoft
> decided not
> to add a Common Control section to the manifest for MBCS builds.
>
> If you do not use CEditView, you can add the manifest by hand, as Giovanni
> suggests.
>
> I don't have VS2005 installed, but in VS2008 there is a segment at the end
> of
> stdafx.h that implements the common control entry in the manifest. Just
> remove the
>
> #ifdef _UNICODE
>
> from this segment.
>
> --
> David Wilkinson
> Visual C++ MVP