src:http://blog.myspace.cn/e/403988935.htm
此方法SDK/MFC通用,簡單的講就是插入一個資源,類別爲24,ID爲1,以VC6爲例,2003和 05類似。在VC6資源編輯試圖下點擊Insert(插入),然後選擇Custom(自定義),在Resource Type(資源類別)填上24,然後在新插入的資源屬性對話框中不勾選"External file",並在右邊內資源容中輸入:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="XP style manifest"
processorArchitecture="x86"
version="1.0.0.0"
type="win32"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
再次編譯執行你的程序,完工!
當這種方法用於VC6開發出來的舊風格的UI時,有少量控件是要稍微修改的!!!
例如:ToolBar,舊風格的ToolBar控件要比按鈕大7×6象素,而xp風格的好像不是這個值,因此會有少量象素畫錯。不信你就試試,注意看ToolBar靠近Gripper位置的地方。如果你的程序裏有很多自繪製的控件(以ToolBar最爲明顯),那麼還有不少小地方要微調兩下。不過程序還是會正常工作。