{"id":283,"date":"2013-05-14T21:00:24","date_gmt":"2013-05-14T13:00:24","guid":{"rendered":"http:\/\/blog.sorayuki.net\/?p=283"},"modified":"2016-07-27T02:45:26","modified_gmt":"2016-07-26T18:45:26","slug":"vc%e7%bc%96%e5%86%99%e7%9a%84%e6%9c%ac%e5%9c%b0%e4%bb%a3%e7%a0%81%e7%a8%8b%e5%ba%8f%e4%bd%bf%e7%94%a8xp-style","status":"publish","type":"post","link":"https:\/\/blog.sorayuki.net\/?p=283","title":{"rendered":"VC\u7f16\u5199\u7684\u672c\u5730\u4ee3\u7801\u7a0b\u5e8f\u4f7f\u7528XP Style"},"content":{"rendered":"<p>\u53ea\u662f\u907f\u514d\u5728\u9c7c\u9f99\u6df7\u6742\u7684\u7f51\u7edc\u4e0a\u627e\u5230\u83ab\u540d\u5176\u5999\u4e0d\u53ef\u9760\u8d44\u6599\u7684\u62c5\u5fe7<\/p>\n<p>msdn\u4e0a\u6709\uff0c\u4e0d\u8fc7\u4e34\u65f6\u53bb\u7ffbmsdn\u633a\u9ebb\u70e6\u7684\uff0c\u56e0\u4e3a\u6ca1\u8bb0\u4f4f\u5728\u54ea\u4e2a\u5206\u7c7b\u91cc\u9762\u7684\u8bdd\uff08\u6c57<\/p>\n<p><strong>\u5206\u7c7b\u5728Windows Desktop App Development\u2014\u2014Windows Application UI Development\u2014\u2014Windows Controls\u2014\u2014Visual Styles\u2014\u2014Enabling Visual Styles<\/strong><\/p>\n<p>\u7136\u540e\u82e5\u9047\u4e0a\u7f51\u7edc\u5f88\u6162\uff0c\u8981\u4eba\u547d<\/p>\n<p><!--more-->\u9996\u5148\u662fVC2005\u6216\u4ee5\u4e0a\u7684\u89e3\u51b3\u65b9\u6cd5\uff1a  <\/p>\n<p>\u76f4\u63a5\u94fe\u63a5\u5668\u53c2\u6570\u641e\u8d77<\/p>\n<div id=\"scid:887EC618-8FBE-49a5-A908-2339AF2EC720:1f0431f6-e792-4945-b377-2f1d62f93f1a\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">         <code><\/p>\n<pre>\"\/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"\n\n <\/pre>\n<p><\/code>\n      <\/div>\n<p>\u6216\u8005\u7528#pragma\u52a0\u8fdb\u53bb<\/p>\n<div id=\"scid:887EC618-8FBE-49a5-A908-2339AF2EC720:d5f7c626-c22d-49e6-a843-80f4bb983bb9\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">\n        <code><\/p>\n<pre>#pragma comment(linker,\"\"\/manifestdependency:type='win32' \\\nname='Microsoft.Windows.Common-Controls' version='6.0.0.0' \\\nprocessorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"\")\n\n <\/pre>\n<p><\/code>\n      <\/div>\n<p><strong>\u7136\u540e\u8c03\u7528InitCommonControls();<\/strong>\uff0c\u94fe\u63a5\u5230 ComCtl32.lib\u5373\u53ef<\/p>\n<p>\u4f46\u662fmsdn\u91cc\u9762\u4e13\u95e8\u6ce8\u660e\u4e86\u8981vs2005\u4ee5\u4e0a\u3002\u5927\u6982\u4ee5\u524d\u7248\u672c\u4e0d\u884c\u5427\u3002<\/p>\n<p>\u7136\u540e\u5c31\u662f\u7528manifest\u6e05\u5355\u6587\u4ef6\u7684\u529e\u6cd5\uff0c\u662f\u4e00\u4e2axml\uff0c\u4ee5\u8d44\u6e90\u65b9\u5f0f\u52a0\u5165\uff1a<\/p>\n<div id=\"scid:887EC618-8FBE-49a5-A908-2339AF2EC720:edb4728e-07fb-43a7-802e-4b259c76d72d\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">\n        <code><\/p>\n<pre>&lt;?xml version='1.0' encoding='UTF-8' standalone='yes'?&gt;\n&lt;assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'&gt;\n  &lt;trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v3\"&gt;\n    &lt;security&gt;\n      &lt;requestedPrivileges&gt;\n        &lt;requestedExecutionLevel level='asInvoker' uiAccess='false' \/&gt;\n      &lt;\/requestedPrivileges&gt;\n    &lt;\/security&gt;\n  &lt;\/trustInfo&gt;\n  &lt;dependency&gt;\n    &lt;dependentAssembly&gt;\n      &lt;assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*' \/&gt;\n    &lt;\/dependentAssembly&gt;\n  &lt;\/dependency&gt;\n&lt;\/assembly&gt;\n\n\n <\/pre>\n<p><\/code>\n      <\/div>\n<p>\u8d44\u6e90\u7c7b\u578b\u662f24\uff08RT_MANIFEST\uff09\uff0c<br \/>\u8d44\u6e90id\u662f1\uff08CREATEPROCESS_MANIFEST_RESOURCE_ID\uff09\u3002\u4e0d\u662f1\u4e0d\u77e5\u9053\u884c\u4e0d\u884c\uff0c\u4e5f\u8bb8\u53ef\u4ee5\u3002<\/p>\n<p>\u7136\u540e\u8c03\u7528InitCommonControls();\uff0c\u94fe\u63a5\u5230 ComCtl32.lib\u5373\u53ef<\/p>\n<p>\u91cc\u9762\u8fd9\u4e9bYourApplication\u5565\u7684\u7701\u7565\u6389\u5b83\u5c31\u8d6b\u7136\u4e0d\u80fd\u542f\u52a8\u4e86\u3002\u7565\u70e6\u2026\u2026\u4e0d\u60f3\u5199\u7684\u65f6\u5019\u5c31\u8fd9\u4e48\u7559\u7740\u5417\u3002<\/p>\n<p><strong>2014-1-2\u6dfb\u52a0<\/strong>\uff1a\u94fe\u63a5\u5668\u5982\u679c\u6ca1\u6709\/MANIFEST:NO\u6216\u8005\u7528\u4e86\/MANIFEST\u7684\u8bdd\uff0c\u4f1a\u751f\u6210\u4e00\u4e2amanifest\u6587\u4ef6\u3002\u5982\u679c\u524d\u9762\u7528\u7684\u662fpragma\u65b9\u6cd5\uff0c\u6b64\u65f6\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a\u5c0f\u5f97\u591a\u7684manifest\u6587\u4ef6\u3002\u57fa\u4e8e\u6b64\uff0c\u6211\u628a\u4e0a\u9762\u90a3\u4e2axml\u7684\u5185\u5bb9\u7b80\u5316\u6210\u6211\u5f97\u5230\u7684manifest\u6587\u4ef6\u7684\u5185\u5bb9\u4e86\uff0c\u672c\u6765\u662f\u4f8b\u5b50\u91cc\u7684\uff0c\u957f\u4e0d\u5c11\u3002<\/p>\n<p>vc6\u91cc\u52a0\u5165\u8fd9\u6837\u7684\u8d44\u6e90\uff0c\u6309\u94ae\u4e4b\u7c7b\u7684\u4e5f\u80fd\u51faxp style\u4e86\u3002\u76ee\u6d4bMinGW GCC\u4e0b\u5e94\u8be5\u4e5f\u884c\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong>2013-6-5\u8865\u5145\uff1a\u6ce8\u610f\u554a\uff01\u4e0dInitCommonControls\u5b83\u53ef\u80fd\u8fde\u5bf9\u8bdd\u6846\u90fd\u4e0d\u51fa\u6765\u4e86\uff01\u6240\u4ee5\u4e00\u5b9a\u8981\u8fd9\u4e2a\u554a\uff01\u6211\u4eca\u5929\u89e3\u51b3\u7684\u4e00\u4e2a\u95ee\u9898\u5c31\u662f\u56e0\u4e3a\u6ca1\u6709\u8fd9\u4e2a\u2026\u2026<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53ea\u662f\u907f\u514d\u5728\u9c7c\u9f99\u6df7\u6742\u7684\u7f51\u7edc\u4e0a\u627e\u5230\u83ab\u540d\u5176\u5999\u4e0d\u53ef\u9760\u8d44\u6599\u7684\u62c5\u5fe7 msdn\u4e0a\u6709\uff0c\u4e0d\u8fc7\u4e34\u65f6\u53bb\u7ffbmsdn\u633a\u9ebb\u70e6\u7684\uff0c\u56e0\u4e3a\u6ca1\u8bb0\u4f4f &hellip; <a href=\"https:\/\/blog.sorayuki.net\/?p=283\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">VC\u7f16\u5199\u7684\u672c\u5730\u4ee3\u7801\u7a0b\u5e8f\u4f7f\u7528XP Style<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,11],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","hentry","category-vc","category-windows"],"_links":{"self":[{"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=283"}],"version-history":[{"count":0,"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=\/wp\/v2\/posts\/283\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sorayuki.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}