From: jc on
Hello,

I am updating an old legacy application (5 years old).
I was able to get the application to compile with VC++2008.
However, I noticed, that the button controls are still
the old style (tan), and not the new colors, which
are white with a blue trim.

In the resource editor, the controls are disiplayed with the
new colors, but after I compile the applications, and then
run the program, the old colors are displayed.

What changes do I have to make, to the code, libraries.., to
be able to see the new control colors?

TIA,
-jc
From: Tom Serface on
Do you have an old style manifest compiling into the file as one of the
resources? If so you may want to try just deleting it and letting it use
what the OS wants. You could also take a look at the new Feature Pack stuff
since it supports theming to a point.

Tom

"jc" <jc(a)discussions.microsoft.com> wrote in message
news:94FFD503-DF30-40C4-A1B7-A267D4FE5A40(a)microsoft.com...
> Hello,
>
> I am updating an old legacy application (5 years old).
> I was able to get the application to compile with VC++2008.
> However, I noticed, that the button controls are still
> the old style (tan), and not the new colors, which
> are white with a blue trim.
>
> In the resource editor, the controls are disiplayed with the
> new colors, but after I compile the applications, and then
> run the program, the old colors are displayed.
>
> What changes do I have to make, to the code, libraries.., to
> be able to see the new control colors?
>
> TIA,
> -jc

From: Scott McPhillips [MVP] on
"jc" <jc(a)discussions.microsoft.com> wrote in message
news:94FFD503-DF30-40C4-A1B7-A267D4FE5A40(a)microsoft.com...
> Hello,
>
> I am updating an old legacy application (5 years old).
> I was able to get the application to compile with VC++2008.
> However, I noticed, that the button controls are still
> the old style (tan), and not the new colors, which
> are white with a blue trim.
>
> In the resource editor, the controls are disiplayed with the
> new colors, but after I compile the applications, and then
> run the program, the old colors are displayed.
>
> What changes do I have to make, to the code, libraries.., to
> be able to see the new control colors?


The new colors come from common control library v 6. Try building a basic
MFC project and copying the manifest stuff for the common controls, and
#include <afxcmn.h>, and also the call to InitCommonControlsEx.

The manifest requires _UNICODE. If you are not in unicode you can try
removing that #ifdef (most things work without it).

--
Scott McPhillips [VC++ MVP]

From: jc on
Hi Scott,

Thanks for the suggestion.

I created a new "dummy" project,
and then added all of my old code.
It worked great!

Also, I had to remove the _UNICODE
macro in the stdafx.h file.

Thanks again,
-jc

From: Joseph M. Newcomer on
On Mon, 26 Apr 2010 19:51:01 -0700, jc <jc(a)discussions.microsoft.com> wrote:

>Hi Scott,
>
>Thanks for the suggestion.
>
>I created a new "dummy" project,
>and then added all of my old code.
>It worked great!
>
>Also, I had to remove the _UNICODE
>macro in the stdafx.h file.
****
It would be weird to have _UNICODE defined in stdafx.h; note that you normally define BOTH
_UNICODE
and
UNICODE
on the command line!

If you define only one, you are going to be in trouble!
joe
>
>Thanks again,
>-jc
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm