{"id":81,"date":"2017-04-17T10:43:54","date_gmt":"2017-04-17T02:43:54","guid":{"rendered":"http:\/\/www.winradar.com\/?p=81"},"modified":"2025-02-13T11:13:05","modified_gmt":"2025-02-13T03:13:05","slug":"81","status":"publish","type":"post","link":"http:\/\/www.winradar.com\/?p=81","title":{"rendered":"MFC\u4f7f\u7528duilib\u7684\u51e0\u79cd\u65b9\u5f0f"},"content":{"rendered":"<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>MFC\u6d41\u884c\u4e86\u5f88\u591a\u5e74\u7684\u754c\u9762\u5f00\u53d1\u5de5\u5177\u5305\uff0c\u968f\u7740\u65f6\u4ee3\u7684\u8fdb\u6b65\uff0cUI\u8bbe\u8ba1\u4e5f\u6709\u5f88\u5927\u7684\u6539\u53d8\uff0c\u4ee5\u524d\u4e2d\u89c4\u4e2d\u77e9\u7684UI\u754c\u9762\u4e5f\u5f00\u59cb\u53d8\u5f97\u7f8e\u89c2\u6f02\u4eae\u8d77\u6765\u3002\u4f46\u662fMFC\u53d7\u5236\u4e8e\u5176\u7ed8\u5236\u673a\u5236\uff0c\u505a\u8fd9\u4e9b\u4e2a\u6027\u5316\u7684\u8bbe\u8ba1\u5c31\u529b\u4e0d\u4ece\u5fc3\u4e86\u3002\u6700\u8fd1\u51e0\u5e74\u968f\u7740DirectUI\u7684\u6d41\u884c\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u4ea7\u54c1\u5f00\u59cb\u4f7f\u7528\u8fd9\u79cd\u6280\u672f\u6765\u8fdb\u884c\u5f00\u53d1\u4e86\u3002\u4ee5DirectUI\u4e3a\u6280\u672f\u57fa\u7840\u7684duilib\u7c7b\u5e93\uff0c\u4ee5\u5176\u7b80\u5355\u6613\u7528\uff0c\u529f\u80fd\u4e0d\u4fd7\u8d62\u5f97\u4e86\u5e7f\u5927\u7a0b\u5e8f\u5458\u7684\u9752\u7750\u3002\u65b0\u7684\u9879\u76ee\u53ef\u4ee5\u4ece\u4f60\u4e2a\u5934\u5f00\u59cb\u91c7\u7528duilib\u5f00\u53d1\uff0c\u4f46\u662f\u8fc7\u53bb\u5f88\u591a\u9879\u76ee\u9700\u8981\u5347\u7ea7\u7ef4\u62a4\uff0c\u8981\u662f\u91cd\u6784\u5f88\u662f\u6d6a\u8d39\u4eba\u529b\u7269\u529b\uff0c\u4e8e\u662f\u91c7\u53d6\u4e86\u6298\u4e2d\u7684\u65b9\u6cd5\uff1a\u4ee5MFC\u4f5c\u4e3a\u6846\u67b6\uff0c\u91c7\u7528duilib\u6765\u7f8e\u5316\u7a0b\u5e8f\u754c\u9762\u3002\u4e0b\u9762\u5c31\u6765\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u5177\u4f53MFC\u548cduilib\u90fd\u6709\u54ea\u51e0\u79cd\u7ed3\u5408\u65b9\u5f0f\uff1a<\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>1\u3001\u7236\u5b50\u5d4c\u5957\uff1aMFC\u7a97\u53e3\u4f5c\u4e3a\u4e3b\u7a97\u53e3\uff0c\u521b\u5efaduilib\u7a97\u53e3\u4f5c\u4e3a\u5176\u5b50\u7a97\u53e3\u6765\u5b9e\u73b0\u3002\u8fd9\u6837\u505a\u9700\u8981\u628a\u539f\u6765\u7236\u7a97\u53e3\u7684\u4e00\u4e9b\u548c\u754c\u9762\u4ea4\u4e92\u7684\u903b\u8f91\u79fb\u690d\u5230\u5b50\u7a97\u53e3\u6765\u5b9e\u73b0\uff0c\u4f46\u662f\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\uff0c\u6709\u5f88\u591a\u5f00\u53d1\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\uff1b<\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>2\u3001\u53cd\u5ba2\u4e3a\u4e3b\uff1a\u521b\u5efaduilib\u7a97\u53e3\u4e3a\u4e3b\u7a97\u53e3\uff0c\u628a\u539f\u6709\u7684MFC\u7a97\u53e3\u4f5c\u4e3a\u4e00\u4e2a\u666e\u901a\u7684\u7a97\u53e3\u63a7\u4ef6\u6765\u7ba1\u7406\u3002\u5b9e\u73b0\u65b9\u6cd5\uff1a\u901a\u8fc7\u91cd\u8f7dCControlUI\u7ef4\u62a4\u4e00\u4e2aHWND\u53e5\u67c4\uff0c\u5e76\u901a\u8fc7SetVisible\u3001SetEnabled\u548cSetPos\u6765\u8fdb\u884c\u7a97\u53e3\u72b6\u6001\u7684\u7ef4\u62a4\uff1b<\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>3\u3001\u5077\u6881\u6362\u67f1\uff1a\u4fdd\u6301\u539f\u6709MFC\u7a97\u53e3\u4e0d\u53d8\uff0c\u901a\u8fc7Hook\u5176\u7a97\u53e3\u8fc7\u7a0b\u6765\u63a5\u7ba1\u5176\u7a97\u53e3\u7ed8\u5236\u65b9\u5f0f\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u80fd\u5b8c\u7f8e\u89e3\u51b3\u754c\u9762\u7ed8\u5236\u95ee\u9898\uff0c\u800c\u4e14\u8fd8\u80fd\u4fdd\u6301\u539f\u6709\u7684\u5904\u7406\u903b\u8f91\u57fa\u672c\u4e0d\u9700\u8981\u6539\u53d8\uff0c\u7701\u65f6\u7701\u529b\uff1b<\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'><br><\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>\u9488\u5bf9\u4e0a\u8ff0\u51e0\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9879\u76ee\u7279\u70b9\u6765\u8fdb\u884c\u9009\u62e9\uff0c\u4e0d\u8fc7\u6211\u81ea\u5df1\u6700\u559c\u6b22\u7684\u5c31\u662f\u7b2c\u4e09\u79cd\u65b9\u5f0f\u3002\u6240\u4ee5\u4e0b\u9762\u63d0\u4f9b\u7b2c\u4e09\u79cd\u65b9\u5f0f\u7684\u4f7f\u7528\u4f8b\u5b50\uff1a<\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>1\u3001\u622a\u56fe\uff1a<\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'><img decoding=\"async\" src=\"http:\/\/www.winradar.com\/wp-content\/uploads\/2017\/04\/20151123151011325.png\" title=\"20151123151011325.png\"><\/p>\n<p style='margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: \"microsoft yahei\";font-size: 15px;white-space: normal'>2\u3001\u5b8c\u6574\u4ee3\u7801\u8bf7\u8054\u7cfbTroy\uff08QQ\uff1a656067418\uff09<\/p>\n<p><br><\/p>","protected":false},"excerpt":{"rendered":"<p>MFC\u6d41\u884c\u4e86\u5f88\u591a\u5e74\u7684\u754c\u9762\u5f00\u53d1\u5de5\u5177\u5305\uff0c\u968f\u7740\u65f6\u4ee3\u7684\u8fdb\u6b65\uff0cUI\u8bbe\u8ba1\u4e5f\u6709\u5f88\u5927\u7684\u6539\u53d8\uff0c\u4ee5\u524d\u4e2d\u89c4\u4e2d\u77e9\u7684UI\u754c\u9762\u4e5f\u5f00\u59cb\u53d8\u5f97\u7f8e\u89c2\u6f02\u4eae\u8d77\u6765\u3002\u4f46\u662fMFC\u53d7\u5236\u4e8e\u5176\u7ed8\u5236\u673a\u5236\uff0c\u505a\u8fd9\u4e9b\u4e2a\u6027\u5316\u7684\u8bbe\u8ba1\u5c31\u529b\u4e0d\u4ece\u5fc3\u4e86\u3002\u6700\u8fd1\u51e0\u5e74\u968f\u7740DirectUI\u7684\u6d41\u884c\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u4ea7\u54c1\u5f00\u59cb\u4f7f\u7528\u8fd9\u79cd\u6280\u672f\u6765\u8fdb\u884c\u5f00<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-duilib","category-opensource","comments-off"],"_links":{"self":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=81"}],"version-history":[{"count":1,"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":83,"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions\/83"}],"wp:attachment":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}