Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I changed my pc from WinXp to Win7. But I'm continuing to use VS2005.
Now an old project (may be created with VS2002) have a strange behaviour.
All the button/edit style has no visual effect and it has the look of win2000. (On XP this was not happens)
This image explains the problem:
link[^]:confused:

The more strange thing is that if I run the application ouside VS the style are all ok, but when debugging they came back to win2000 style (both debug and release).

I create a new empty MDI-MFC application (like the original one) and then running into VS the styles are ok X| .
Searcing for differences into the 2 folders I found some differences in the project file. But I think not important details.
One strange thing is that in the new application is absolutely missing the manifest... can the problem be related to that file?:~

I found also any article that explain the problem... do you have any link to suggest to me? :doh:

Thanks
Posted

To get the xp look the application would need to have a manifest that indicate this for your application. You would either need to add it in the resources or place it in the directory of the application.

It's explained here:
http://msdn.microsoft.com/en-us/library/aa289524%28VS.71%29.aspx[^]

Good luck!
 
Share this answer
 
In addition to what E.F. Nijboer already wrote, be aware about how VS2002/2003 and VS2005 handle the manifest:


  • On Visual Studio 2002/2003, when you create a new project, a text file with extension .manifest is created and added to the solution. To embed it in te resources you should add it to your .rc file as an RT_MANIFEST resource type.
  • On Visual Studio 2005 and newer, when you create a new project, some pragmas are added to your stdafx.h file:
    C++
    #if defined _M_IX86
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #elif defined _M_IA64
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #elif defined _M_X64
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #else
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #endif

    This informations are used later by the Manifest Tool (i.e. mt.exe) to create a manifest and embed it into the resources of the executable (after the linking step).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900