I have upgraded from Visual Studio 2010 to Visual Studio 2013.
I have also installed the Multibyte MFC Library for Visual Studio 2013.
Since upgrading, the visual styles no longer apply to the controls created in the MFC dialogs.
I will point out that Visual Studio previews (renders) it semi correctly (wrong background but generally the correct controls), it's only at runtime (Debug or Release etc) does this strange change happen.
I have added a new MFC application to my current solution. When I debug this MFC app it renders with Visual Styles.
Edit
I have followed the advice found in How to enable visual styles without a manifest
This means, in the MFC project I have a stdafx.h
. Since I'm using a version later than VS2005 (and since there is no manifest file), I have added the following to stdafx.h
#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_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
Edit
If it matters, this project's default Character Set is set to Use Multi-Byte Character Set
Edit
There is no manifest file for this project. It is embedded.
Edit
Comparing the .exe file (opened with notepad) of the VS2010 build and VS2013 build shows the same manifest file with 1 exception
VS2010
<ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings" xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</ms_windowsSettings:dpiAware>
VS2013
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
However, I don't see how the DPI would affect this.
Edit
I've just realised there is another project in this solution which also uses MFC dialogs. The same issue persists to that as well.
Update
I have ensured the project settings are as identical between a new MFC project and my C++ projects (with the difference being MFC exports to an Application where as I export my project to a .dll)
I have ensured the stafx.h in my project is the same as a new MFC project (with the difference that my C++ project requires ActiveX Control includes)
Please note, the manifest is embedded, and was created via the properties pane. There was no manually configured xml file.