   VC2005 produces old style gui !
  I have created a MFC project and GUI was ok at first. I added many lines of code ( including loading the Collada format, adding Shaders , etc ). Now when I add a button for example, It's shape is like windows 98 buttons! The buttons use XP style inside VC2005 editor, but their shape changes after executing the project!Any Ideas? Thanks -Ehsan-   
  Have you done the things you need to as per the instructions on MSDN? See Using Windows XP Visual styles.   ;  I followed its instructions, but it didn't solve my problem.I again created an MFC application and just added the files of my project to the new project. Again the problem appears after adding the files. Those files don't deal with MFC commands , so maybe they use some headers that changes the appearance of the controls?;Quote:Original post by ehsan2004it didn't solve my problem.Then you didn't fully follow the instructions.What does the manifest file you created look like?   ;  Another link with some of the same stuff.But it also has this tidbit if you don't want to bother with the manifest file (not sure if there are any downsides to this):#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' "\ "version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")VS2005 or higher    ;  OK,First of all I'm wondering why everything seems to be OK without adding the new files. I have even created a project called Cal3DViewer( available at sourceforge ) and didn't use this manifest file and everything was fine.I followed the section "Using ComCtl32.dll Version 6 in an Application That Does Not Use Third-Party Extensions" of the suggested page. 1)First of all I created a new text file and copied the suggested text inside this text file:<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentityversion="1.0.0.0"processorArchitecture="X86"name="CompanyName.ProductName.YourApp"type="win32"/><description>Your application description here.</description><dependency><dependentAssembly><assemblyIdentitytype="win32"name="Microsoft.Windows.Common-Controls"version="6.0.0.0"processorArchitecture="X86"publicKeyToken="6595b64144ccf1df"language="*"/></dependentAssembly></dependency></assembly> 2)I changed the name of this file to myprojectname.exe.manifest and copied it beside my project files ( which consist of stdafx.h, stdafx.cpp , etc ) and the "Release" folder.3) initInstance() consists of these lines at the beginning:INITCOMMONCONTROLSEX InitCtrls;InitCtrls.dwSize = sizeof(InitCtrls);// Set this to include all the common control classes you want to use// in your application.InitCtrls.dwICC = ICC_WIN95_CLASSES;InitCommonControlsEx(&InitCtrls);I called InitCommonControls after these lines and removed the above default lines ).4) I added this line at the end of resource.h:CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "myprojectname.exe.manifest" The prgram requested for mfc80.dll, msvcr80.dll and msvcp80.dll. I downloaded these files from www.dll-files.com and copied them beside my project files. Then the program executed, but with a run time error!:R6034An application has made an attempt to load the C runtime library incorrectly. Then:application failed to initilalize properly( 0x0000142). Click the OK button to terminate the application.And after pressing the OK button I received this error:Unhandled exception at 0x7c964ed1 in MyEngine.exe: 0xC0000142: DLL Initialization Failed.5) so I tried to use the .exe.intermidiate.manifest file which is created with my VC2005 compiler. It's name is MyEngine.exe.intermediate.manifest and it consists of the following code:<?xml version='1.0' encoding='UTF-8' standalone='yes'?><assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>  <dependency>    <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />    </dependentAssembly>  </dependency>  <dependency>    <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />    </dependentAssembly>  </dependency></assembly>And now I don't receive any errors, but I see the problem of old style buttons and other controls :-(   ;Quote:Original post by KittyRaAnother link with some of the same stuff.But it also has this tidbit if you don't want to bother with the manifest file (not sure if there are any downsides to this):#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' "\ "version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")VS2005 or higher I just used this code in stdafx.h and it solved my problem :)It was one of the best #pragma s in my life :)   ;  Here's the correct #pragma which doesn't produce any warnings:#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")