rainbowzc

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: :: :: 管理 ::

最近移植vs2005工程到vs2008发现了manifest的用处,之前在nt平台xp style的界面风格也没有太在意,在程序中没有加入,但是到了vista平台发现用它默认的界面风格已经很不错了,对比二者的stdafx.h会发现manifest的用处和引用方法,#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
还是要读读msdn相关的资料,这样的程序跑起来负担最小,最优化!
还有是在vista平台下增加了UAC的功能所以在manifest中一定要设置
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>

posted on 2008-07-15 00:40  ct  阅读(1914)  评论(0编辑  收藏  举报