首先在你的工程的 "res目錄" 下建一個文件, 命名 windows.manifest 後綴爲:.manifestweb
而後用記事本打開放入
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="Microsoft.Windows.XXXX"
processorArchitecture="x86"
version="5.1.0.0"
type="win32"/>
<description>Windows Shell</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
保存..
而後導入資源,把文件windows.manifest添加到工程的資源中:
插入->資源->引入->文件類型改成「全部文件"->找到windows.manifest->彈出對話框
資源類型 填"24"(這個好像只能填24,我也不知道什麼意思,有明白的能夠留言告訴我,謝謝!)->肯定後再把資源的ID改成"IDR_MANIFEST"
而後在String Table中添加IDR_MANIFEST,id值爲1(也能夠到到resource.h中更改IDR_MANIFEST的ID值爲1)。
從新生成編譯運行,這樣你的程序就有了XP/Win7的風格
注:本文的內容也是在網上學習的,有懂這個原理的能夠教教我...