You should at least add this line to your project, for example add it to stdafx.h
#pragma comment(linker,""/manifestdependency:type='win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"")
Or add the following to your manifest file:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
See also Enabling Visual Styles
It gets more complicated for owner draw controls. See this reference:
Using Visual Styles with Custom and Owner-Drawn Controls
For ListView and TreeView controls, you can call this function for a more modern look (although it doesn't make any difference in Windows 10)
SetWindowTheme(m_ListView.m_hWnd, L"Explorer", NULL);
SetWindowTheme(m_TreeView.m_hWnd, L"Explorer", NULL);
* #pragma comment
is Visual Studio specific. For other compilers you need to modify the manifest file
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…