VC++實現XP介面風格

來源:互聯網
上載者:User

使用VS 6.0看慣了呆板的線條組成的控制項,是不是也想讓程式的介面使用XP風格?
本文介紹一種"零"勞動的方法幫你實現VC++的XP介面

首先,在工程檔案夾內儲存下列藍色代碼為*.manifest(注意:深紅色部分為可以自訂部分,不會影響程式工作)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="CompanyName.ProductName.YourApp" type="win32"/>
<description>Your application description here.</description>
<dependency> <dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly></dependency>
</assembly>
//其實這就是一個XML檔案
然後用記事本開啟工程目錄下面的*.rc檔案
末尾加入如下藍色代碼:
1 24 "*.manifest"
// "1"代表資源ID,必須是"1" ; "24"代表資源類型RT_MANIFEST ; 其餘括弧內的東西就是剛剛儲存的檔案名稱

如果編輯rc檔案時沒有關閉VC++,再次返回IDE環境可能會提示,選擇重新開啟即可;
接下來...組建工程...
就可以看到效果了吧...

注意:使用VC++6.0sp6 & WinXP測試通過

本文代碼和FAQ均為CreativeJQ整理自互連網,不反對但不鼓勵轉載,轉載務必保留原版資訊和連結!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.