From: Woody on
When I use the Dialog Editor in VS2005, the editor displays buttons
with rounded corners and group boxes with text in blue. When the MFC
application is run, the same dialog displays buttons with square
corners and group boxes with text in black. Also, the font size is
slightly different.

Is there a way to make the dialog in the app look identical to the
rendition by the editor?

If this is not possible, can the editor's display be changed to look
like the dialog as it appears when the app is run?
From: Giovanni Dicanio on
"Woody" <ols6000(a)sbcglobal.net> ha scritto nel messaggio
news:fd6a9c67-3b94-40fc-9f33-088ed8238607(a)p8g2000yqb.googlegroups.com...

> When I use the Dialog Editor in VS2005, the editor displays buttons
> with rounded corners and group boxes with text in blue. When the MFC
> application is run, the same dialog displays buttons with square
> corners and group boxes with text in black. Also, the font size is
> slightly different.

This sounds like the EXE is not using Windows XP new "Luna" style, and this
might be a manifest problem.
(In fact, I think that VS2005 automatically inserts manifest into app
resources to give the EXE a Windows XP style).

I wonder if you are compiling in ANSI/MBCS or Unicode.
IIRC, this problem occurred if code was compiled in ANSI/MBCS.

I would suggest you to check that you are building your EXE in Unicode.

HTH,
Giovanni



From: David Ching on
"Giovanni Dicanio" <giovanniDOTdicanio(a)REMOVEMEgmail.com> wrote in message
news:#1r37k1lKHA.6096(a)TK2MSFTNGP02.phx.gbl...
> This sounds like the EXE is not using Windows XP new "Luna" style, and
> this might be a manifest problem.
> (In fact, I think that VS2005 automatically inserts manifest into app
> resources to give the EXE a Windows XP style).
>
> I wonder if you are compiling in ANSI/MBCS or Unicode.
> IIRC, this problem occurred if code was compiled in ANSI/MBCS.
>
> I would suggest you to check that you are building your EXE in Unicode.
>

I also think it is required to call InitCommonControlsEx in the
InitInstance(). If it still doesn't work, I suggest creating a MFC
application using the VS2005 AppWizard and comparing the code that it
generated with what you have in your app.

-- David

From: Woody on
> > I wonder if you are compiling in ANSI/MBCS or Unicode.
> > IIRC, this problem occurred if code was compiled in ANSI/MBCS.
>
> > I would suggest you to check that you are building your EXE in Unicode.

> I also think it is required to call InitCommonControlsEx in the
> InitInstance().

By using your suggestion, David, I determined that only Unicode
compilation is necessary, at least for buttons and group boxes.

Unfortunately, using the Unicode libraries generates a lot of errors,
because text strings aren't written as macros, and, as well, many
parts of the app depend on single-byte characters (Joe, no need to
give me the Unicode speech). So I guess I'm stuck with the old visual
style.
From: David Ching on
"Woody" <ols6000(a)sbcglobal.net> wrote in message
news:55211f70-b4e1-4bd9-a15c-ff47cca28d55(a)e37g2000yqn.googlegroups.com...
>> > I wonder if you are compiling in ANSI/MBCS or Unicode.
>> > IIRC, this problem occurred if code was compiled in ANSI/MBCS.
>>
>> > I would suggest you to check that you are building your EXE in Unicode.
>
>> I also think it is required to call InitCommonControlsEx in the
>> InitInstance().
>
> By using your suggestion, David, I determined that only Unicode
> compilation is necessary, at least for buttons and group boxes.
>
> Unfortunately, using the Unicode libraries generates a lot of errors,
> because text strings aren't written as macros, and, as well, many
> parts of the app depend on single-byte characters (Joe, no need to
> give me the Unicode speech). So I guess I'm stuck with the old visual
> style.

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?

-- David