{"id":348,"date":"2025-04-01T00:00:10","date_gmt":"2025-03-31T16:00:10","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/"},"modified":"2025-04-01T00:00:10","modified_gmt":"2025-03-31T16:00:10","slug":"%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/","title":{"rendered":"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"htmledit_views\" id=\"content_views\">\n<p id=\"main-toc\">\n   <strong><br \/>\n    \u76ee\u5f55<br \/>\n   <\/strong>\n  <\/p>\n<p id=\"%E4%B8%80%E3%80%81%E5%89%8D%E8%A8%80-toc\" style=\"margin-left:0px\">\n   <a href=\"#%E4%B8%80%E3%80%81%E5%89%8D%E8%A8%80\" rel=\"nofollow\"><br \/>\n    \u4e00\u3001\u524d\u8a00<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%B8%80%E3%80%81%E6%9C%89%E5%93%AA%E4%BA%9B%E5%9F%BA%E7%A1%80%E9%9C%80%E8%A6%81%E6%88%91%E6%8E%8C%E6%8F%A1%E7%9A%84%EF%BC%9F-toc\" style=\"margin-left:0px\">\n   <a href=\"#%E4%B8%80%E3%80%81%E6%9C%89%E5%93%AA%E4%BA%9B%E5%9F%BA%E7%A1%80%E9%9C%80%E8%A6%81%E6%88%91%E6%8E%8C%E6%8F%A1%E7%9A%84%EF%BC%9F\" rel=\"nofollow\"><br \/>\n    \u4e8c\u3001\u6709\u54ea\u4e9b\u57fa\u7840\u9700\u8981\u6211\u638c\u63e1\u7684\uff1f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.Windows%20Aero%E4%B8%8E%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%88DWM%EF%BC%89-toc\" style=\"margin-left:40px\">\n   <a href=\"#1.Windows%20Aero%E4%B8%8E%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%88DWM%EF%BC%89\" rel=\"nofollow\"><br \/>\n    1. Windows Aero \u4e0e\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.1%20Windows%20Aero%20%E9%85%8D%E8%89%B2%E6%96%B9%E6%A1%88-toc\" style=\"margin-left:80px\">\n   <a href=\"#1.1%20Windows%20Aero%20%E9%85%8D%E8%89%B2%E6%96%B9%E6%A1%88\" rel=\"nofollow\"><br \/>\n    1.1 Windows Aero \u914d\u8272\u65b9\u6848<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.2%20%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%88DWM%EF%BC%89-toc\" style=\"margin-left:80px\">\n   <a href=\"#1.2%20%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%88DWM%EF%BC%89\" rel=\"nofollow\"><br \/>\n    1.2 \u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A01.3%20DWM%E6%9C%8D%E5%8A%A1-toc\" style=\"margin-left:80px\">\n   <a href=\"#%C2%A01.3%20DWM%E6%9C%8D%E5%8A%A1\" rel=\"nofollow\"><br \/>\n    1.3 DWM \u670d\u52a1\uff08\u4ec5\u9650 Win7\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.4%20%E9%80%9A%E8%BF%87%E6%8E%A5%E5%8F%A3%E5%90%AF%E7%94%A8%2F%E7%A6%81%E7%94%A8%20DWM%20%E7%AA%97%E5%8F%A3%E5%90%88%E6%88%90-toc\" style=\"margin-left:80px\">\n   <a href=\"#1.4%20%E9%80%9A%E8%BF%87%E6%8E%A5%E5%8F%A3%E5%90%AF%E7%94%A8%2F%E7%A6%81%E7%94%A8%20DWM%20%E7%AA%97%E5%8F%A3%E5%90%88%E6%88%90\" rel=\"nofollow\"><br \/>\n    1.4 \u901a\u8fc7\u63a5\u53e3\u542f\u7528\/\u7981\u7528 DWM \u7a97\u53e3\u5408\u6210<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.5%20DWM%20%E7%B3%BB%E7%BB%9F%E5%85%B3%E9%94%AE%E8%BF%9B%E7%A8%8B-toc\" style=\"margin-left:80px\">\n   <a href=\"#1.5%20DWM%20%E7%B3%BB%E7%BB%9F%E5%85%B3%E9%94%AE%E8%BF%9B%E7%A8%8B\" rel=\"nofollow\"><br \/>\n    1.5 DWM \u7cfb\u7edf\u5173\u952e\u8fdb\u7a0b<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E9%80%9A%E8%BF%87%20Spy%2B%2B%20%E5%B7%A5%E5%85%B7%E7%A0%94%E7%A9%B6%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E5%B1%82%E6%AC%A1-toc\" style=\"margin-left:40px\">\n   <a href=\"#%E4%BA%8C%E3%80%81%E9%80%9A%E8%BF%87%20Spy%2B%2B%20%E5%B7%A5%E5%85%B7%E7%A0%94%E7%A9%B6%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E5%B1%82%E6%AC%A1\" rel=\"nofollow\"><br \/>\n    2. \u901a\u8fc7 Spy++ \u5de5\u5177\u7814\u7a76\u684c\u9762\u7a97\u53e3\u5c42\u6b21<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.1%20%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E5%B1%82%E6%AC%A1-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.1%20%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E5%B1%82%E6%AC%A1\" rel=\"nofollow\"><br \/>\n    2.1 \u684c\u9762\u7a97\u53e3\u5c42\u6b21<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.2%20%E5%A6%82%E4%BD%95%E5%BD%A2%E6%88%90%20WorkerW%20%E5%88%86%E5%B1%82%E7%AA%97%E5%8F%A3-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.2%20%E5%A6%82%E4%BD%95%E5%BD%A2%E6%88%90%20WorkerW%20%E5%88%86%E5%B1%82%E7%AA%97%E5%8F%A3\" rel=\"nofollow\"><br \/>\n    2.2 \u5982\u4f55\u5f62\u6210 WorkerW \u5206\u5c42\u7a97\u53e3<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E4%BD%BF%E7%94%A8%E6%AD%A5%E9%AA%A4-toc\" style=\"margin-left:0px\">\n   <a href=\"#%E4%BA%8C%E3%80%81%E4%BD%BF%E7%94%A8%E6%AD%A5%E9%AA%A4\" rel=\"nofollow\"><br \/>\n    \u4e09\u3001\u5b9e\u6218&amp;\u7f16\u5199\u4ee3\u7801<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.%E5%BC%95%E5%85%A5%E5%BA%93-toc\" style=\"margin-left:40px\">\n   <a href=\"#1.%E5%BC%95%E5%85%A5%E5%BA%93\" rel=\"nofollow\"><br \/>\n    1. \u5982\u4f55\u4e3a\u5d4c\u5165\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u505a\u597d\u51c6\u5907\uff1f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1.1.%20%E7%A1%AE%E4%BF%9D%E5%B7%B2%E7%BB%8F%E5%90%AF%E5%8A%A8%20DWM%20%E7%AA%97%E5%8F%A3%E5%90%88%E6%88%90-toc\" style=\"margin-left:80px\">\n   <a href=\"#1.1.%20%E7%A1%AE%E4%BF%9D%E5%B7%B2%E7%BB%8F%E5%90%AF%E5%8A%A8%20DWM%20%E7%AA%97%E5%8F%A3%E5%90%88%E6%88%90\" rel=\"nofollow\"><br \/>\n    1.1. \u786e\u4fdd\u5df2\u7ecf\u542f\u52a8 DWM \u7a97\u53e3\u5408\u6210<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.2.%20%E6%80%8E%E6%A0%B7%E5%90%AF%E7%94%A8%E6%A1%8C%E9%9D%A2%20WorkerW%20%E5%88%86%E7%BB%84%E5%B1%82%E6%AC%A1%EF%BC%9F-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.2.%20%E6%80%8E%E6%A0%B7%E5%90%AF%E7%94%A8%E6%A1%8C%E9%9D%A2%20WorkerW%20%E5%88%86%E7%BB%84%E5%B1%82%E6%AC%A1%EF%BC%9F\" rel=\"nofollow\"><br \/>\n    1.2. \u600e\u6837\u542f\u7528\u5de5\u4f5c\u533a\u7a97\u53e3(WorkerW)\uff1f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.3%20%E4%B8%BA%E4%BB%80%E4%B9%88%E8%AF%B4%E9%AB%98%E7%89%88%E6%9C%AC%E5%BF%85%E9%A1%BB%E4%BB%A5WorkerW%202%E4%B8%BA%E7%88%B6%E7%AA%97%E5%8F%A3%E5%91%A2%EF%BC%9F-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.3%20%E4%B8%BA%E4%BB%80%E4%B9%88%E8%AF%B4%E9%AB%98%E7%89%88%E6%9C%AC%E5%BF%85%E9%A1%BB%E4%BB%A5WorkerW%202%E4%B8%BA%E7%88%B6%E7%AA%97%E5%8F%A3%E5%91%A2%EF%BC%9F\" rel=\"nofollow\"><br \/>\n    1.3 \u4e3a\u4ec0\u4e48\u8bf4\u9ad8\u7248\u672c\u5fc5\u987b\u4ee5 WorkerW 2 \u4e3a\u7236\u7a97\u53e3\u5462\uff1f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.4%20%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%BF%99%E4%BA%9B%E7%AA%97%E5%8F%A3%E7%9A%84%E5%8F%A5%E6%9F%84%EF%BC%9F-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.4%20%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%BF%99%E4%BA%9B%E7%AA%97%E5%8F%A3%E7%9A%84%E5%8F%A5%E6%9F%84%EF%BC%9F\" rel=\"nofollow\"><br \/>\n    1.4 \u5982\u4f55\u83b7\u53d6\u8fd9\u4e9b\u7a97\u53e3\u7684\u53e5\u67c4\uff1f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.5.%20%E6%9B%B4%E6%94%B9%E7%88%B6%E7%AA%97%E5%8F%A3%E5%AE%9E%E7%8E%B0%E5%B5%8C%E5%85%A5%E5%A3%81%E7%BA%B8%E7%AA%97%E5%8F%A3-toc\" style=\"margin-left:40px\">\n   <a href=\"#2.5.%20%E6%9B%B4%E6%94%B9%E7%88%B6%E7%AA%97%E5%8F%A3%E5%AE%9E%E7%8E%B0%E5%B5%8C%E5%85%A5%E5%A3%81%E7%BA%B8%E7%AA%97%E5%8F%A3\" rel=\"nofollow\"><br \/>\n    2.\u00a0\u66f4\u6539\u7236\u7a97\u53e3\u5b9e\u73b0\u5d4c\u5165\u58c1\u7eb8\u7a97\u53e3<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.5.1%20%E9%97%AE%E9%A2%98%E4%B8%80%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%9A-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.5.1%20%E9%97%AE%E9%A2%98%E4%B8%80%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%9A\" rel=\"nofollow\"><br \/>\n    2.1 \u95ee\u9898\u4e00\u89e3\u51b3\u65b9\u6848\uff08\u66f4\u65b0\u7236\u7a97\u53e3\u95ee\u9898\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.5.2%20%E9%97%AE%E9%A2%98%E4%BA%8C%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.5.2%20%E9%97%AE%E9%A2%98%E4%BA%8C%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\" rel=\"nofollow\"><br \/>\n    2.2 \u95ee\u9898\u4e8c\u89e3\u51b3\u65b9\u6848\uff08\u865a\u62df\u684c\u9762\u548c\u6269\u5c55\u5c4f\u5206\u8fa8\u7387\u95ee\u9898\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.3%20%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E5%B9%B6%E5%88%A4%E6%96%AD%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%EF%BC%88%E6%9C%AA%E6%9D%A5%E5%8F%AF%E8%83%BD%E6%9B%B4%E6%94%B9%EF%BC%89-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.3%20%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E5%B9%B6%E5%88%A4%E6%96%AD%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%EF%BC%88%E6%9C%AA%E6%9D%A5%E5%8F%AF%E8%83%BD%E6%9B%B4%E6%94%B9%EF%BC%89\" rel=\"nofollow\"><br \/>\n    2.3 \u5982\u4f55\u83b7\u53d6\u5e76\u5224\u65ad\u7cfb\u7edf\u7248\u672c\uff08\u672a\u6765\u53ef\u80fd\u66f4\u6539\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.3%20%E8%A7%A3%E5%86%B3%E9%80%80%E5%87%BA%E7%A8%8B%E5%BA%8F%E6%97%B6%E7%AA%97%E5%8F%A3%E6%AE%8B%E5%BD%B1%E9%97%AE%E9%A2%98-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.3%20%E8%A7%A3%E5%86%B3%E9%80%80%E5%87%BA%E7%A8%8B%E5%BA%8F%E6%97%B6%E7%AA%97%E5%8F%A3%E6%AE%8B%E5%BD%B1%E9%97%AE%E9%A2%98\" rel=\"nofollow\"><br \/>\n    2.4 \u89e3\u51b3\u9000\u51fa\u7a0b\u5e8f\u65f6\u7a97\u53e3\u6b8b\u5f71\u95ee\u9898<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.3%20%E8%A1%A5%E5%85%85%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9-toc\" style=\"margin-left:80px\">\n   <a href=\"#2.3%20%E8%A1%A5%E5%85%85%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9\" rel=\"nofollow\"><br \/>\n    2.5 \u4e0a\u6587\u6ce8\u610f\u4e8b\u9879\u7684\u4e00\u4e9b\u8865\u5145<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.5%20%E5%85%B3%E4%BA%8E%200x052C%20%E7%A7%81%E6%9C%89%E6%B6%88%E6%81%AF%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94-toc\" style=\"margin-left:40px\">\n   <a href=\"#2.5%20%E5%85%B3%E4%BA%8E%200x052C%20%E7%A7%81%E6%9C%89%E6%B6%88%E6%81%AF%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94\" rel=\"nofollow\"><br \/>\n    3 \u5173\u4e8e 0x052C \u79c1\u6709\u6d88\u606f\u7684\u517c\u5bb9\u6027\u95ee\u9898\uff08\u91cd\u8981\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.1%200x052C%20%E5%A4%84%E7%90%86%E6%9C%BA%E5%88%B6%E7%9A%84%E6%BD%9C%E5%9C%A8%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98-toc\" style=\"margin-left:80px\">\n   <a href=\"#3.1%200x052C%20%E5%A4%84%E7%90%86%E6%9C%BA%E5%88%B6%E7%9A%84%E6%BD%9C%E5%9C%A8%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98\" rel=\"nofollow\"><br \/>\n    3.1 0x052C \u5904\u7406\u673a\u5236\u7684\u6f5c\u5728\u517c\u5bb9\u6027\u95ee\u9898<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.2%20%E5%AF%B9%E5%B7%B2%E7%9F%A5%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88-toc\" style=\"margin-left:80px\">\n   <a href=\"#3.2%20%E5%AF%B9%E5%B7%B2%E7%9F%A5%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\" rel=\"nofollow\"><br \/>\n    3.2 \u5bf9\u5df2\u77e5\u517c\u5bb9\u6027\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.%20%E5%AE%8C%E6%95%B4%E4%BB%A3%E7%A0%81%E4%BB%A5%E5%8F%8A%E6%B5%8B%E8%AF%95%E6%88%AA%E5%9B%BE-toc\" style=\"margin-left:40px\">\n   <a href=\"#3.%20%E5%AE%8C%E6%95%B4%E4%BB%A3%E7%A0%81%E4%BB%A5%E5%8F%8A%E6%B5%8B%E8%AF%95%E6%88%AA%E5%9B%BE\" rel=\"nofollow\"><br \/>\n    4. \u5b8c\u6574\u4ee3\u7801\u4ee5\u53ca\u6d4b\u8bd5\u622a\u56fe<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.1%20%E4%BB%A3%E7%A0%81-toc\" style=\"margin-left:80px\">\n   <a href=\"#3.1%20%E4%BB%A3%E7%A0%81\" rel=\"nofollow\"><br \/>\n    4.1 \u4ee3\u7801<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.2%20%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E5%B1%95%E7%A4%BA-toc\" style=\"margin-left:80px\">\n   <a href=\"#3.2%20%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E5%B1%95%E7%A4%BA\" rel=\"nofollow\"><br \/>\n    4.2 \u8fd0\u884c\u7ed3\u679c\u5c55\u793a<br \/>\n   <\/a>\n  <\/p>\n<p id=\"5.%20%E5%85%B3%E4%BA%8E%E5%90%8E%E7%BB%AD%E5%B7%A5%E4%BD%9C-toc\" style=\"margin-left:40px\">\n   <a href=\"#5.%20%E5%85%B3%E4%BA%8E%E5%90%8E%E7%BB%AD%E5%B7%A5%E4%BD%9C\" rel=\"nofollow\"><br \/>\n    5. \u5173\u4e8e\u540e\u7eed\u5de5\u4f5c<br \/>\n   <\/a>\n  <\/p>\n<p id=\"4.%20%E5%90%91%E5%90%8E%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%EF%BC%883%E6%9C%8817%E6%97%A5%E6%9B%B4%E6%96%B0%EF%BC%89-toc\" style=\"margin-left:0px\">\n   <a href=\"#4.%20%E5%90%91%E5%90%8E%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%EF%BC%883%E6%9C%8817%E6%97%A5%E6%9B%B4%E6%96%B0%EF%BC%89\" rel=\"nofollow\"><br \/>\n    \u56db\u3001\u5904\u7406\u5411\u540e\u517c\u5bb9\u6027\u95ee\u9898\uff086 \u6708 25 \u65e5\u66f4\u65b0\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"4.1%20%E9%97%AE%E9%A2%98%E6%8F%90%E5%87%BA-toc\" style=\"margin-left:40px\">\n   <a href=\"#4.1%20%E9%97%AE%E9%A2%98%E6%8F%90%E5%87%BA\" rel=\"nofollow\"><br \/>\n    4.1 \u95ee\u9898\u63d0\u51fa<br \/>\n   <\/a>\n  <\/p>\n<p id=\"4.2%20%E7%9B%AE%E5%89%8D%E7%9A%84%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88-toc\" style=\"margin-left:40px\">\n   <a href=\"#4.2%20%E7%9B%AE%E5%89%8D%E7%9A%84%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\" rel=\"nofollow\"><br \/>\n    4.2 \u7a97\u53e3\u663e\u793a\u89e3\u51b3\u65b9\u6848\uff083 \u6708 24 \u65e5\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"4.3%20%E6%9C%80%E6%96%B0%E7%9A%84%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%886%E6%9C%889%E6%97%A5%EF%BC%89-toc\" style=\"margin-left:40px\">\n   <a href=\"#4.3%20%E6%9C%80%E6%96%B0%E7%9A%84%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%886%E6%9C%889%E6%97%A5%EF%BC%89\" rel=\"nofollow\"><br \/>\n    4.3 \u6700\u65b0\u7684\u7a97\u53e3\u663e\u793a\u89e3\u51b3\u65b9\u6848\uff086 \u6708 9 \u65e5\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"4.4%20%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%886%20%E6%9C%88%2011%20%E6%97%A5%20%7C%20%E5%AE%9E%E9%AA%8C%E6%80%A7%EF%BC%89-toc\" style=\"margin-left:40px\">\n   <a href=\"#4.4%20%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%886%20%E6%9C%88%2011%20%E6%97%A5%20%7C%20%E5%AE%9E%E9%AA%8C%E6%80%A7%EF%BC%89\" rel=\"nofollow\"><br \/>\n    4.4 \u7a97\u53e3\u663e\u793a\u89e3\u51b3\u65b9\u6848\uff086 \u6708 11 \u65e5 | \u5b9e\u9a8c\u6027\uff09<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E5%90%8E%E8%AE%B0-toc\" style=\"margin-left:0px\">\n   <a href=\"#%E5%90%8E%E8%AE%B0\" rel=\"nofollow\"><br \/>\n    \u4e94\u3001\u540e\u8bb0<br \/>\n   <\/a>\n  <\/p>\n<hr id=\"hr-toc\"\/>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u672c\u6587\u94fe\u63a5\uff1a[<br \/>\n   <\/span><br \/>\n   <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/125361650\" title=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/125361650\"><br \/>\n    https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/125361650<br \/>\n   <\/a><br \/>\n   <span style=\"color:#0d0016\"><br \/>\n    ]\u3002<br \/>\n   <\/span>\n  <\/p>\n<h2 id=\"%E4%B8%80%E3%80%81%E5%89%8D%E8%A8%80\">\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     \u4e00\u3001\u524d\u8a00<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n  <\/h2>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u672c\u6587\u7ae0\u4ee5\u5728<br \/>\n     <strong><br \/>\n      Windows<br \/>\n     <\/strong><br \/>\n     \u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\uff08\u684c\u9762\u56fe\u6807\u540e\u9762\uff09\u5d4c\u5165\u7b2c\u4e09\u65b9\u7a97\u53e3\u4e3a\u4e3b\u9898\uff0c\u4e3b\u8981\u9488\u5bf9\u52a8\u6001\u58c1\u7eb8\u5b9e\u73b0\u539f\u7406\u8fdb\u884c\u8bb2\u89e3\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<blockquote>\n<p>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u63d0\u9192\uff1a\u4f5c\u8005\u5c06\u5bf9\u4f7f\u7528\u672c\u6587\u65b9\u6cd5\uff08\u4e5f\u662f\u7f51\u4e0a\u6d41\u4f20\u5f88\u5e7f\u7684\u65b9\u6cd5\uff09\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898\u8fdb\u884c\u4ed4\u7ec6\u7814\u7a76\u5206\u6790\uff0c\u6587\u7ae0\u5c06\u4e0d\u5b9a\u671f\u66f4\u65b0\uff0c\u76ee\u524d\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898\u5728 3.3(3.1, 3.2)\u00a0\u5c0f\u8282\u548c 3.4(4.1) \u5c0f\u8282\u5747\u6709\u63cf\u8ff0\u3002<br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff082024.06.04\uff09<br \/>\n    <\/span>\n   <\/p>\n<p style=\"text-align:center\">\n    <strong><br \/>\n     <span style=\"color:#fe2c24\"><br \/>\n      \uff01\uff01\uff01\uff01\u672c\u6587\u6709\u597d\u591a\u5730\u65b9\u9700\u8981\u4fee\u8ba2\uff0c\u672a\u6765\u53ef\u80fd\u91cd\u65b0\u5199\u8fd9\u7bc7\uff0806.10\uff09\uff01\uff01\uff01<br \/>\n     <\/span><br \/>\n    <\/strong>\n   <\/p>\n<\/blockquote>\n<p>\n   <strong><br \/>\n    Wallpaper Engine<br \/>\n   <\/strong><br \/>\n   \u662f\u7531<br \/>\n   <strong><br \/>\n    Kristjan Skutta<br \/>\n   <\/strong><br \/>\n   \u6240\u5f00\u53d1\u7684\u4e00\u6b3e\u52a8\u6001\u58c1\u7eb8\u8f6f\u4ef6\uff0c\u533a\u522b\u4e8e\u5176\u4ed6\u5f62\u5f0f\u7684\u58c1\u7eb8\u8f6f\u4ef6\uff0c<br \/>\n   <strong><br \/>\n    Wallpaper Engine<br \/>\n   <\/strong><br \/>\n   \u53ef\u4ee5\u8ba9\u7528\u6237\u901a\u8fc7\u5176\u5f15\u64ce\u6df1\u5ea6\u7684\u81ea\u5b9a\u4e49\u6216\u7f16\u8f91\u6765\u521b\u4f5c\u51fa\u7b26\u5408\u4e2a\u4eba\u9700\u6c42\u7684\u58c1\u7eb8\u6837\u5f0f\u3002\u5982\u679c\u4f60\u60ca\u8273\u4e8e<br \/>\n   <strong><br \/>\n    WallpaperEngine<br \/>\n   <\/strong><br \/>\n   \u7684\u6548\u679c\uff0c\u5e76\u4e14\u81ea\u5df1\u4e5f\u60f3\u5236\u4f5c\u4e2a\u6027\u5316\u7684\u684c\u9762\u7f8e\u5316\u7a0b\u5e8f\uff0c\u90a3\u4e48\u8bf7\u8ddf\u6211\u4e00\u9053\u5b66\u4e60\u76f8\u5173\u7406\u8bba\u548c\u6280\u672f\u5b9e\u73b0\u3002\n  <\/p>\n<p>\n   \u7cfb\u5217\u6587\u7ae0\uff1a\n  <\/p>\n<table align=\"center\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td style=\"text-align:center\">\n      <span style=\"color:#0d0016\"><br \/>\n       <strong><br \/>\n        \u5e8f\u53f7<br \/>\n       <\/strong><br \/>\n      <\/span>\n     <\/td>\n<td>\n      <span style=\"color:#0d0016\"><br \/>\n       <strong><br \/>\n        \u6587\u7ae0\u6807\u9898\uff08\u94fe\u63a5\uff09<br \/>\n       <\/strong><br \/>\n      <\/span>\n     <\/td>\n<td style=\"text-align:center\">\n      <span style=\"color:#0d0016\"><br \/>\n       <strong><br \/>\n        AID<br \/>\n       <\/strong><br \/>\n      <\/span>\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      <strong><br \/>\n       1<br \/>\n      <\/strong>\n     <\/td>\n<td>\n      <a href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/125361650\" title=\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09\"><br \/>\n       \u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09<br \/>\n      <\/a>\n     <\/td>\n<td style=\"text-align:center\">\n      <a href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/125361650\" title=\"125361650\"><br \/>\n       125361650<br \/>\n      <\/a>\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      <strong><br \/>\n       2<br \/>\n      <\/strong>\n     <\/td>\n<td>\n      <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/133801491\" title=\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e8c\uff09\"><br \/>\n       \u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e8c\uff09<br \/>\n      <\/a>\n     <\/td>\n<td style=\"text-align:center\">\n      <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/133801491\" title=\"133801491\"><br \/>\n       133801491<br \/>\n      <\/a>\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      <strong><br \/>\n       3<br \/>\n      <\/strong>\n     <\/td>\n<td>\n      <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/145372399\" title=\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e09\uff09\"><br \/>\n       \u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e09\uff09<br \/>\n      <\/a>\n     <\/td>\n<td style=\"text-align:center\">\n      <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/145372399\" title=\"145372399\"><br \/>\n       145372399<br \/>\n      <\/a>\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      <strong><br \/>\n       4<br \/>\n      <\/strong>\n     <\/td>\n<td>\n      <a href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/138637909\" title=\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\u2014\u2014\u8ba4\u8bc6 WebView2 \u63a7\u4ef6\"><br \/>\n       \u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\u2014\u2014\u8ba4\u8bc6 WebView2 \u63a7\u4ef6<br \/>\n      <\/a>\n     <\/td>\n<td style=\"text-align:center\">\n      <a href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/138637909\" title=\"138637909\"><br \/>\n       138637909<br \/>\n      <\/a>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr\/>\n<h2 id=\"%E4%B8%80%E3%80%81%E6%9C%89%E5%93%AA%E4%BA%9B%E5%9F%BA%E7%A1%80%E9%9C%80%E8%A6%81%E6%88%91%E6%8E%8C%E6%8F%A1%E7%9A%84%EF%BC%9F\">\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     \u4e8c\u3001\u6709\u54ea\u4e9b\u57fa\u7840\u9700\u8981\u6211\u638c\u63e1\u7684\uff1f<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n  <\/h2>\n<h3 id=\"1.Windows%20Aero%E4%B8%8E%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%88DWM%EF%BC%89\">\n   <span style=\"color:#0d0016\"><br \/>\n    1. Windows Aero \u4e0e\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09<br \/>\n   <\/span><br \/>\n  <\/h3>\n<h4 id=\"1.1%20Windows%20Aero%20%E9%85%8D%E8%89%B2%E6%96%B9%E6%A1%88\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.1 Windows Aero \u914d\u8272\u65b9\u6848<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   <strong><br \/>\n    Windows Aero<br \/>\n   <\/strong><br \/>\n   \u662f\u4ece Windows Vista \u5f00\u59cb\u4f7f\u7528\u7684\u65b0\u578b\u7528\u6237\u754c\u9762\uff0c<br \/>\n   <strong><br \/>\n    \u900f\u660e\u73bb\u7483\u611f<br \/>\n   <\/strong><br \/>\n   \u8ba9\u7528\u6237\u4e00\u773c\u8d2f\u7a7f\u3002\u201cAero\u201d\u4e3a\u56db\u4e2a\u82f1\u6587\u5355\u5b57\u7684\u9996\u5b57\u6bcd\u7f29\u7565\u5b57\uff1aAuthentic\uff08\u771f\u5b9e\uff09\u3001Energetic\uff08\u52a8\u611f\uff09\u3001Reflective\uff08\u53cd\u5c04\uff09\u53ca Open\uff08\u5f00\u9614\uff09\u3002\u610f\u4e3a Aero \u754c\u9762\u662f\u5177\u7acb\u4f53\u611f\u3001\u4ee4\u4eba\u9707\u64bc\u3001\u5177\u900f\u89c6\u611f\u548c\u9614\u5927\u7684\u7528\u6237\u754c\u9762\u3002\u9664\u4e86\u900f\u660e\u7684\u63a5\u53e3\u5916\uff0cWindows Aero \u4e5f\u5305\u542b\u4e86\u5b9e\u65f6\u7f29\u7565\u56fe\u3001\u5b9e\u65f6\u52a8\u753b\u7b49\u7a97\u53e3\u7279\u6548\uff0c\u5438\u5f15\u7528\u6237\u7684\u76ee\u5149\u3002\n  <\/p>\n<p>\n   Windows Aero \u662f Windows Vista \u5f00\u59cb\u4f7f\u7528\u7684\u65b0\u5143\u7d20\uff0c\u5305\u542b\u91cd\u65b0\u8bbe\u8ba1 Windows Explorer \u6837\u5f0f\u3001Windows Aero \u73bb\u7483\u6837\u5f0f\u3001Windows Flip 3D \u7a97\u53e3\u5207\u6362\u3001\u4ee5\u53ca\u5b9e\u65f6\u7f29\u7565\u56fe\u8fd8\u6709\u65b0\u7684\u5b57\u4f53\u3002\n  <\/p>\n<p>\n   Windows 7 \u6240\u4f7f\u7528\u7684 Windows Aero \u6709\u8bb8\u591a\u529f\u80fd\u4e0a\u7684\u8c03\u6574\uff0c\u4ee5\u53ca\u65b0\u7684\u89e6\u63a7\u63a5\u53e3\u548c\u65b0\u7684\u89c6\u89c9\u6548\u679c\u53ca\u7279\u6548\uff1a\n  <\/p>\n<ul>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       Aero Peek<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span><br \/>\n     \u9f20\u6807\u6307\u9488\u6307\u5411\u4efb\u52a1\u680f\u4e0a\u56fe\u6807\uff0c\u4fbf\u4f1a\u8df3\u51fa\u8be5\u7a0b\u5e8f\u7684\u7f29\u7565\u56fe\u9884\u89c8\uff0c\u6307\u5411\u7f29\u7565\u56fe\u65f6\u8fd8\u53ef\u770b\u5230\u8be5\u7a0b\u5e8f\u7684\u5168\u5c4f\u9884\u89c8\u3002\u6b64\u5916\uff0c\u9f20\u6807\u6307\u5411\u4efb\u52a1\u680f\u6700\u53f3\u7aef\u7684\u5c0f\u6309\u94ae\u53ef\u770b\u5230\u684c\u9762\u7684\u9884\u89c8\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       Aero Shake<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span><br \/>\n     \u70b9\u51fb\u67d0\u4e00\u7a97\u53e3\u540e\uff0c\u6447\u4e00\u4e0b\u9f20\u6807\uff0c\u53ef\u8ba9\u5176\u4ed6\u6253\u5f00\u4e2d\u7684\u7a97\u53e3\u7f29\u5230\u6700\u5c0f\uff0c\u518d\u6643\u52a8\u4e00\u6b21\u4fbf\u53ef\u6062\u64a4\u6d88\u8c8c\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       Aero Snap<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span><br \/>\n     \u70b9\u51fb\u7a97\u53e3\u540e\u5e76\u62d6\u66f3\u81f3\u684c\u9762\u7684\u5de6\u53f3\u8fb9\u6846\uff0c\u7a97\u53e3\u53d8\u4f1a\u586b\u6ee1\u8be5\u4fa7\u684c\u9762\u7684\u534a\u90e8\u3002\u62d6\u66f3\u81f3\u684c\u9762\u4e0a\u7f18\uff0c\u7a97\u53e3\u53d8\u4f1a\u653e\u5230\u6700\u5927\u3002\u6b64\u5916\uff0c\u70b9\u51fb\u7a97\u53e3\u7684\u8fb9\u6846\u5e76\u62d6\u66f3\u81f3\u684c\u9762\u4e0a\u7f18\u6216\u4e0b\u7f18\u4f1a\u4f7f\u5f97\u7a97\u53e3\u5782\u76f4\u653e\u5230\u6700\u5927\uff0c\u4f46\u5bbd\u5ea6\u4e0d\u53d8\uff0c\u9006\u5411\u64cd\u4f5c\u540e\u7a97\u53e3\u5219\u4f1a\u64a4\u6d88\u56de\u539f\u8c8c\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       \u89e6\u63a7\u63a5\u53e3<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span><br \/>\n     \u4e3a\u4e86\u65b9\u4fbf\u5229\u7528\u89e6\u63a7\u6280\u672f\u64cd\u4f5c\uff0c\u4e9b\u5fae\u653e\u5927\u4e86\u6807\u9898\u680f\u53ca\u4efb\u52a1\u680f\u7684\u6309\u94ae\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     \u653e\u5230\u6700\u5927\u7684\u7a97\u53e3\u4ecd\u65e7\u4fdd\u6301\u900f\u660e\u7684\u8fb9\u6846\uff0c\u800c\u4ee5\u5f80 Windows Vista \u4e2d\uff0c\u7a97\u53e3\u653e\u5230\u6700\u5927\u540e\uff0c\u4f1a\u4ee5\u8be5\u4e3b\u9898\u7684\u989c\u8272(\u7a97\u53e3\u989c\u8272)\u586b\u6ee1\u8fb9\u6846\uff0c\u6709\u76f8\u5f53\u5927\u7684\u4e0d\u540c\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     \u5f53\u9f20\u6807\u6ed1\u8fc7\u4efb\u52a1\u680f\u4e0a\u7684\u56fe\u6807\u65f6\uff0c\u56fe\u6807\u80cc\u666f\u4f1a\u6d6e\u73b0\u8be5\u56fe\u6807\u6700\u663e\u8457\u7684 RGB \u8272\u5f69\uff0c\u6b64\u5916\uff0c\u9f20\u6807\u7684\u6307\u9488\u5904\u4f1a\u6709\u66f4\u4eae\u7684\u989c\u8272\u8ddf\u7740\u6307\u9488\u79fb\u52a8\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     \u5f53\u79fb\u52a8\u7a97\u53e3\u65f6\uff0cAero \u7279\u6548\u7684\u7a97\u53e3\u66f4\u65b0\u7387\u4f1a\u964d\u4f4e\uff0c\u51cf\u4f4e CPU\u00a0\u548c GPU\u00a0\u7684\u8d1f\u8377\uff0c \u8ba9\u7a0b\u5e8f\u80fd\u7a33\u5b9a\u7684\u8fd0\u4f5c\u3002\n    <\/p>\n<\/li>\n<li>\n<p>\n     \u7528\u6237\u53ef\u9009\u62e9\u6253\u5f00\u6216\u5173\u95ed\u7a97\u53e3\u8fb9\u6846\u9634\u5f71\u6548\u679c\u3002\n    <\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6ce8\uff1aWindows7 Home Basic\u3001Windows Vista Home Basic \u9690\u85cf\u4e86 Aero \u7279\u6548\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\u6ce8\u518c\u8868\u5f3a\u884c\u5f00\u542f\u3002Windows 8 \u6b63\u5f0f\u7248\u4e2d\u53d6\u6d88\u4e86\u5bf9\u7cfb\u7edf\u7a97\u53e3\u5e94\u7528\u7684\u00a0Aero Glass \u7279\u6548\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<h4 id=\"1.2%20%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%88DWM%EF%BC%89\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.2 \u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   <strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \u200b\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08Desktop Window Manager, DWM\uff09<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u662f Windows Vista \u53ca\u66f4\u9ad8\u7248\u672c\u7684 Windows \u684c\u9762\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u7ec4\u4ef6\u3002\n  <\/p>\n<p>\n   DWM \u7684\u684c\u9762\u5408\u6210\u5efa\u7acb\u5728 Composition \u5f15\u64ce\u57fa\u7840\u4e4b\u4e0a\uff0c\u7ed3\u5408\u4e86\u00a0WPF \u6838\u5fc3\u56fe\u5f62\u5c42\u7ec4\u4ef6\u57fa\u7840\u3002\u5b83\u7684\u51fa\u73b0\u51e0\u4e4e\u6539\u53d8\u4e86 Vista \u4e2d\u5e94\u7528\u7a0b\u5e8f\u7684\u5c4f\u5e55\u8c61\u7d20\u663e\u793a\u65b9\u5f0f\u3002\u542f\u7528 DWM \u540e\uff0c\u63d0\u4f9b\u7684\u89c6\u89c9\u6548\u679c\u6709\u6bdb\u73bb\u7483\u6846\u67b6\u30013D \u7a97\u53e3\u53d8\u6362\u52a8\u753b\u3001\u7a97\u53e3\u7ffb\u8f6c\u548c\u9ad8\u5206\u8fa8\u7387\u652f\u6301\u3002\n  <\/p>\n<p>\n   \u5e94\u7528\u7a0b\u5e8f\u7684\u663e\u793a\u4e0d\u518d\u662f\u76f4\u63a5\u753b\u5230\u5c4f\u5e55\u4e0a\uff0c\u800c\u662f\u4e00\u4e2a\u663e\u793a\u5185\u5b58\u4e2d\u7684\u4e00\u4e2a\u79bb\u5c4f Surface \u3002\u7136\u540e\u7531 DWM \u5c06\u8fd9\u4e9b Surface \u5408\u6210\u663e\u793a\u5230\u5c4f\u5e55\u4e4b\u4e0a\u3002\n  <\/p>\n<p>\n   \u5728Vista\u4e4b\u524d\uff0cWindows \u8981\u6c42\u5e94\u7528\u7a0b\u5e8f\u753b\u81ea\u5df1\u7684\u53ef\u89c1\u533a\u57df\uff0c\u5b83\u4eec\u53ef\u4ee5\u76f4\u63a5\u753b\u5728\u663e\u5361\u7684\u89c6\u9891\u7f13\u51b2\u91cc\u9762\u3002\u800c\u5728 Vista\uff0c\u7cfb\u7edf\u8981\u6c42\u5e94\u7528\u7a0b\u5e8f\u628a\u6574\u4e2a\u8868\u9762\u753b\u5230\u79bb\u5c4f Surface \u5f53\u4e2d\u3002\u7136\u540e\u7531 DWM \u63a7\u5236\u6240\u6709\u7684\u79bb\u5c4f\u8868\u9762\uff0c\u5e76\u628a\u5b83\u4eec\u5408\u6210\u5230\u4e00\u8d77\u663e\u793a\u5230\u771f\u6b63\u7684\u5c4f\u5e55\u4e0a\u3002\n  <\/p>\n<p>\n   DWM \u7684\u4e3b\u8981\u76ee\u6807\u5c31\u662f\u5229\u7528\u56fe\u5f62\u82af\u7247\u7684\u5904\u7406\u80fd\u529b\u4e5f\u7ed9\u975e\u6e38\u620f\u7528\u6237\u5e26\u6765\u5c3d\u53ef\u80fd\u597d\u7684\u4f53\u9a8c\u3002\u56e0\u6b64 DWM \u662f\u57fa\u4e8e DirectX\uff0c\u7279\u522b\u662f Direct3D\u3002\u66f4\u51c6\u786e\u6765\u8bf4\uff0cDWM \u662f\u76f4\u63a5\u5efa\u7acb\u5728\u4e00\u4e2a\u79f0\u4e3a Milcore \u7684\u5c42\u6b21\u4e4b\u4e0a\uff0c\u800c Milcore \u53c8\u5efa\u7acb\u5728 DirectX \u4e4b\u4e0a\uff0c\u6700\u7ec8\u662f\u7528 Direct3D \u7eb9\u7406\u6765\u8868\u793a\u7a97\u53e3\u5185\u5bb9\u548c\u7a97\u53e3\u6846\u67b6\u3002 DWM\/Milcore \u8c03\u7528\u9002\u5f53\u7684 Direct3D \u51fd\u6570\u628a\u6240\u6709\u7684 Direct3D \u7eb9\u7406\u5408\u6210\u4e3a\u6700\u7ec8\u7684\u684c\u9762\u3002Vista \u6216 Win7 \u684c\u9762\u5c31\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u5168\u5c4f\u5e55\u7684 Direct3D \u5e94\u7528\u7a0b\u5e8f\u3002\n  <\/p>\n<h4 id=\"%C2%A01.3%20DWM%E6%9C%8D%E5%8A%A1\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.3 DWM \u670d\u52a1\uff08\u4ec5\u9650 Win7\uff09<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p style=\"text-align:justify\">\n   \u5728 Win 7 \u4e0a\uff0c\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\u5668\uff0cDesktop Window Manager Session Manager\uff08DWMSMs\uff09\u662f\u4e00\u9879\u670d\u52a1\uff0c\u9ed8\u8ba4\u81ea\u52a8\u542f\u52a8\uff0c\u82e5\u7ec8\u6b62\u8be5\u670d\u52a1\uff0c\u5c06\u5bfc\u81f4 Aero \u89c6\u89c9\u6548\u679c\u6d88\u5931\u3002\u4f60\u53ef\u4ee5\u5728\u63a7\u5236\u9762\u677f\\\u7ba1\u7406\u5de5\u5177\\\u670d\u52a1\u4e2d\u67e5\u770b\u670d\u52a1\u72b6\u6001\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<p style=\"text-align:justify\">\n   \u53f3\u952e\u9009\u9879\u5361\uff0c\u70b9\u51fb\u5c5e\u6027\u680f\uff0c\u53ef\u4ee5\u770b\u5230\u5b83\u7684\u670d\u52a1\u540d\u79f0\uff1aUxSms\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<p>\n   DWM \u7684\u76ee\u5f55\u4f4d\u7f6e\u4e3a\uff1aC:\\Windows\\System32 \uff0c\u5176\u76ee\u5f55\u7ed3\u6784\u4e3a\uff1a\n  <\/p>\n<p style=\"text-align:center\">\n<p>\n   DWM \u8fdb\u7a0b\u4e3a svchost.exe \u7684\u5b50\u8fdb\u7a0b\uff0c\u4f7f\u7528 Process Explorer \u67e5\u770b\u8fdb\u7a0b\u5173\u7cfb\u5982\u4e0b\uff1a\n  <\/p>\n<p style=\"text-align:center\">\n<p>\n   \u7528\u6237\u53ef\u4ee5<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7\"><br \/>\n     \u901a\u8fc7 NET \u547d\u4ee4\u6765\u64cd\u4f5c DWM \u670d\u52a1<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u63a7\u5236\u53f0\u7a97\u53e3\u952e\u5165\u4ee5\u4e0b\u6307\u4ee4\uff1a\n  <\/p>\n<p>\n   1.\u542f\u52a8 DWM \u670d\u52a1\uff1anet start UxSms\n  <\/p>\n<p>\n   2.\u7ec8\u6b62 DWM \u670d\u52a1\uff1anet stop UxSms\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<h4 id=\"1.4%20%E9%80%9A%E8%BF%87%E6%8E%A5%E5%8F%A3%E5%90%AF%E7%94%A8%2F%E7%A6%81%E7%94%A8%20DWM%20%E7%AA%97%E5%8F%A3%E5%90%88%E6%88%90\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.4 \u901a\u8fc7\u63a5\u53e3\u542f\u7528\/\u7981\u7528 DWM \u7a97\u53e3\u5408\u6210<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   Windows 7 \u4ee5\u53ca Vista \u7cfb\u7edf\u7248\u672c\u4e0b\uff0c\u652f\u6301\u7f16\u7a0b\u7981\u7528 DWM\uff0c\u5c31\u662f\u56e0\u4e3a\u8fd9\u4e2a\u7981\u7528\u529f\u80fd\u5bfc\u81f4\u6211\u4eec\u7684\u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u5fc5\u987b\u80fd\u591f\u68c0\u6d4b DWM \u7684\u72b6\u6001\u6539\u53d8\uff0c\u9664\u975e\u7a0b\u5e8f\u4e0d\u9700\u8981\u9002\u914d Win7 \u7cfb\u7edf\u3002\n  <\/p>\n<p>\n   \u5b8c\u5168\u63a7\u5236\u684c\u9762\u7684\u5e94\u7528\u7a0b\u5e8f\uff08\u4f8b\u5982\u5728\u5168\u5c4f\u6a21\u5f0f\u4e0b\u8fd0\u884c\u7684\u6e38\u620f\uff09\u5fc5\u987b\u786e\u5b9a\u662f\u5426\u5df2\u542f\u7528 DWM\uff0c\u9700\u8981\u4e24\u4e2a\u51fd\u6570\u6765\u68c0\u67e5 DWM \u72b6\u6001\uff08\u4e0b\u9762\u51fd\u6570\u4ec5\u5728 Win7 \u6709\u6548\uff09\uff1a\n  <\/p>\n<ul>\n<li>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/Dwmapi\/nf-dwmapi-dwmiscompositionenabled\" rel=\"nofollow\" title=\"DwmIsCompositionEnabled\"><br \/>\n     DwmIsCompositionEnabled<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/Dwmapi\/nf-dwmapi-dwmenablecomposition\" rel=\"nofollow\" title=\"DwmEnableComposition\"><br \/>\n     DwmEnableComposition<br \/>\n    <\/a>\n   <\/li>\n<\/ul>\n<p>\n   \u5728<br \/>\n   <em><br \/>\n    fEnable<br \/>\n   <\/em><br \/>\n   \u8bbe\u7f6e\u4e3a<br \/>\n   <strong><br \/>\n    DWM_EC_DISABLECOMPOSITION<br \/>\n   <\/strong><br \/>\n   \u7684\u60c5\u51b5\u4e0b\u8c03\u7528<br \/>\n   <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/Dwmapi\/nf-dwmapi-dwmenablecomposition\" rel=\"nofollow\" title=\"DwmEnableComposition\"><br \/>\n    DwmEnableComposition<br \/>\n   <\/a><br \/>\n   \u4f1a\u7981\u7528 DWM \u5408\u6210\uff0c\u76f4\u5230\u8c03\u7528\u8fdb\u7a0b\u5df2\u5173\u95ed\uff0c\u6216\u8005\u901a\u8fc7\u5c06<br \/>\n   <em><br \/>\n    fEnable<br \/>\n   <\/em><br \/>\n   \u8bbe\u7f6e\u4e3a<br \/>\n   <strong><br \/>\n    DWM_EC_ENABLECOMPOSITION<br \/>\n   <\/strong><br \/>\n   \u8c03\u7528<br \/>\n   <strong><br \/>\n    DwmEnableComposition<br \/>\n   <\/strong><br \/>\n   \u6765\u91cd\u65b0\u542f\u7528\u5408\u6210\u3002\n  <\/p>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u6ce8\u610f\uff1a\u7981\u7528\u7ec4\u5408\u7684\u6240\u6709\u5e94\u7528\u7a0b\u5e8f\u5173\u95ed\u540e\u6216\u901a\u8fc7\u8c03\u7528<br \/>\n    <strong><br \/>\n     DwmEnableComposition<br \/>\n    <\/strong><br \/>\n    \u624b\u52a8\u91cd\u65b0\u542f\u7528\u7ec4\u5408\u540e\uff0cDWM \u7ec4\u5408\u4f1a\u81ea\u52a8\u91cd\u542f\u3002<br \/>\n   <\/span>\n  <\/p>\n<h4 id=\"1.5%20DWM%20%E7%B3%BB%E7%BB%9F%E5%85%B3%E9%94%AE%E8%BF%9B%E7%A8%8B\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.5 DWM \u7cfb\u7edf\u5173\u952e\u8fdb\u7a0b<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   \u4ece Windows 8 \u5f00\u59cb\uff0c\u5f53\u5e94\u7528\u7a0b\u5e8f\u5c1d\u8bd5\u76f4\u63a5\u7ed8\u5236\u5230\u4e3b\u8981\u663e\u793a\u56fe\u9762\u65f6\uff0cDWM \u4f1a\u81ea\u52a8\u7981\u7528\u5408\u6210\u3002 \u7ec4\u5408\u5c06\u88ab\u7981\u7528\uff0c\u76f4\u5230\u8be5\u5e94\u7528\u7a0b\u5e8f\u91ca\u653e\u4e3b\u8bbe\u5907\u56fe\u9762\u3002\u5fae\u8f6f\u5c06\u8be5\u8fdb\u7a0b\u5f52\u4e3a\u7531 Winlogon.exe \u8fdb\u7a0b\u542f\u52a8\u548c\u76d1\u89c6\u7684\u5173\u952e\u8fdb\u7a0b\uff0cdwm.exe \u4e0d\u518d\u662f\u670d\u52a1\u8fdb\u7a0b\uff0c\u4e0d\u53ef\u4ee5\u88ab\u7f16\u7a0b\u7ec8\u6b62\uff0c\u5426\u5219\u4f1a\u9ed1\u5c4f\u5361\u6b7b\u3002\u4e3b\u8981\u539f\u56e0\u662f\u5f88\u591a\u7cfb\u7edf\u8fd0\u884c\u4e2d\u7684\u5e94\u7528\uff0c\u5c24\u5176\u662f UWP \u5e94\u7528\u5747\u4f9d\u8d56 DWM\uff0c\u5982\u679c DWM \u5d29\u6e83\u5219\u5b83\u4eec\u7684\u56fe\u5f62\u754c\u9762\u4e5f\u5c06\u5d29\u6e83\u3002\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u4f46\u662f\uff0c\u6709\u5f88\u591a\u901a\u8fc7\u94a9\u5b50\u6216\u8005\u4fee\u6539\u94fe\u63a5\u5e93\u5b9e\u73b0\u7981\u7528 DWM \u7684\u4f8b\u5b50\uff0c\u5982\u679c\u6709\u7a7a\u6211\u4f1a\u5355\u72ec\u5199\u4e00\u671f\u3002\n  <\/p>\n<h3 id=\"%E4%BA%8C%E3%80%81%E9%80%9A%E8%BF%87%20Spy%2B%2B%20%E5%B7%A5%E5%85%B7%E7%A0%94%E7%A9%B6%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E5%B1%82%E6%AC%A1\">\n   <span style=\"color:#0d0016\"><br \/>\n    2. \u901a\u8fc7 Spy++ \u5de5\u5177\u7814\u7a76\u684c\u9762\u7a97\u53e3\u5c42\u6b21<br \/>\n   <\/span><br \/>\n  <\/h3>\n<h4 id=\"2.1%20%E6%A1%8C%E9%9D%A2%E7%AA%97%E5%8F%A3%E5%B1%82%E6%AC%A1\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.1 \u684c\u9762\u7a97\u53e3\u5c42\u6b21<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   Windows \u7684\u684c\u9762\u7531\u56fe\u6807\u5217\u8868\u548c\u80cc\u666f\u7a97\u53e3\u7b49\u7ec4\u6210\uff0c\u8fd9\u4e9b\u7a97\u53e3\u4ee5\u53ca\u63a7\u4ef6\u7a97\u53e3\u4e4b\u95f4\u5177\u6709\u4e00\u5b9a\u7684\u5c42\u6b21\u3002\u4f7f\u7528 Spy++ \u53ef\u4ee5\u83b7\u53d6\u5230\u5f00\u673a\u540e\u666e\u901a\u7684\u684c\u9762\u7a97\u53e3\u5c42\u6b21\uff0c\u7ed3\u6784\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<blockquote>\n<p>\n    &#8220;Program Manager&#8221;<br \/>\n    <strong><br \/>\n     Progman<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SHELLDLL_DefView<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;FolderView&#8221;<br \/>\n    <strong><br \/>\n     SysListView32<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SysHeader32<br \/>\n    <\/strong><br \/>\n    (Unvisible)\n   <\/p>\n<\/blockquote>\n<p>\n   \u53ef\u4ee5\u89c2\u5bdf\u5230\u5728 Desktop \u7a97\u53e3\u4e2d Z-Order \u4f4d\u4e8e\u6700\u5e95\u5c42\u7684\u7a97\u53e3\u662f Progman \u7a97\u53e3\uff0c \u5176\u5b50\u7a97\u53e3\u662f SHELLDLL_DefView \u7a97\u53e3\uff0cSHELLDLL_DefView \u53c8\u6709\u4e00\u4e2a\u7a97\u53e3\u7c7b\u4e3a SysListView32 \u7684\u5b50\u7a97\u53e3\u6700\u540e SysHeader32 \u7a97\u53e3\u662f\u4e0d\u53ef\u89c1\u7684\u3002\u663e\u800c\u6613\u89c1\uff0c\u684c\u9762\u4e0a\u7684\u56fe\u6807\u90fd\u5728\u540d\u4e3a\u00a0SysListView32 \u7684\u5217\u8868\u7a97\u53e3\u4e2d\u3002\u5982\u679c\u719f\u6089 MFC\uff0c\u770b\u5230 SysListView32 \u4f1a\u5f88\u773c\u719f\uff0cMFC\u4e2d\u7684 CListCtrl \u63a7\u4ef6\u7a97\u53e3\u7c7b\u4e5f\u662fSysListView32\u3002\n  <\/p>\n<p>\n   \u5728\u8fd9\u79cd\u5c42\u6b21\u4e0b\uff0c \u5f80 Progman \u7a97\u53e3\u4e2d\u5d4c\u5165\u4e00\u4e2a WM_CHILDWINDOW \u6837\u5f0f\u7684\u7a97\u53e3\uff0c\u5c06\u4f1a\u8986\u76d6\u5728\u00a0SysLisView32 \u7a97\u53e3\u4e0a\u65b9\uff0c\u6216\u8005\u88ab\u524d\u9762\u7684\u7a97\u53e3\u6321\u4f4f\uff0c\u65e0\u6cd5\u901a\u8fc7\u5d4c\u5165\u7a97\u53e3\u7684\u65b9\u5f0f\u5b9e\u73b0\u7c7b\u4f3c WallPaper Engine \u90a3\u6837\u7684\u58c1\u7eb8\u3002\u6211\u4eec\u73b0\u5728\u770b\u4e0b Wallpaper Engine \u5d4c\u5165\u58c1\u7eb8\u7a97\u53e3\u65f6\u5019\u684c\u9762\u7a97\u53e3\u5c42\u6b21\uff0cWallpaper Engine \u5728 Win 7 \u4e0a\u7684\u884c\u4e3a\u548c\u66f4\u9ad8\u7248\u672c\u7cfb\u7edf\u4e0d\u4e00\u6837\u3002\n  <\/p>\n<p>\n   \u9996\u5148\u662f Win8 \/ 8.1 \u7cfb\u7edf\uff1a\n  <\/p>\n<blockquote>\n<p>\n    &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW<br \/>\n    <\/strong><br \/>\n    (\u672c\u6587\u79f0\u4f5c WorkerW 1)\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW<br \/>\n    <\/strong><br \/>\n    \uff08WorkerW 0\uff0c\u9876\u7ea7\u7a97\u53e3\u4e3a Progman \u65f6\u5c31\u9ed8\u8ba4\u5177\u6709\uff09\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SHELLDLL_DefView<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;FolderView&#8221;<br \/>\n    <strong><br \/>\n     SysListView32<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SysHeader32<br \/>\n    <\/strong><br \/>\n    (Unvisible)\n   <\/p>\n<p>\n    &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW<br \/>\n    <\/strong><br \/>\n    (\u672c\u6587\u79f0\u4f5c WorkerW 2)\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     CefBrowserWindow<br \/>\n    <\/strong><br \/>\n    (WallpaperEngine \u7684\u6d4f\u89c8\u5668\u7a97\u53e3)\n   <\/p>\n<p>\n    &#8220;Program Manager&#8221;<br \/>\n    <strong><br \/>\n     Progman<br \/>\n    <\/strong>\n   <\/p>\n<\/blockquote>\n<p>\n   \u5176\u6b21\uff0c Win 10 \u81f3 Win 11 23H2 \u64cd\u4f5c\u7cfb\u7edf\uff1a\n  <\/p>\n<blockquote>\n<p>\n    &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW<br \/>\n    <\/strong><br \/>\n    (\u672c\u6587\u79f0\u4f5c WorkerW 1)\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SHELLDLL_DefView<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;FolderView&#8221;<br \/>\n    <strong><br \/>\n     SysListView32<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SysHeader32<br \/>\n    <\/strong><br \/>\n    (Unvisible)\n   <\/p>\n<p>\n    &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW<br \/>\n    <\/strong><br \/>\n    (\u672c\u6587\u79f0\u4f5c WorkerW 2)\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     CefBrowserWindow<br \/>\n    <\/strong><br \/>\n    (WallpaperEngine \u7684\u6d4f\u89c8\u5668\u7a97\u53e3)\n   <\/p>\n<p>\n    &#8220;Program Manager&#8221;<br \/>\n    <strong><br \/>\n     Progman<br \/>\n    <\/strong>\n   <\/p>\n<\/blockquote>\n<p>\n   \u7136\u540e\uff0c\u662f Win 7 \u7cfb\u7edf\uff0c\u5c42\u6b21\u7ed3\u6784\u5982\u4e0b\uff1a\n  <\/p>\n<blockquote>\n<p>\n    &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW 1<br \/>\n    <\/strong><br \/>\n    (Visible, Aero)\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SHELLDLL_DefView<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;FolderView&#8221;<br \/>\n    <strong><br \/>\n     SysListView32<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     SysHeader32<br \/>\n    <\/strong><br \/>\n    (Unvisible)\n   <\/p>\n<p>\n    &#8220;&#8221;<br \/>\n    <strong><br \/>\n     WorkerW 2<br \/>\n    <\/strong><br \/>\n    (Unvisible, White)\n   <\/p>\n<p>\n    &#8220;Program Manager&#8221;<br \/>\n    <strong><br \/>\n     Progman<br \/>\n    <\/strong>\n   <\/p>\n<p>\n    | &#8212; &#8220;&#8221;<br \/>\n    <strong><br \/>\n     CefBrowserWindow<br \/>\n    <\/strong><br \/>\n    (Wallpaper Engine \u7684\u6d4f\u89c8\u5668\u7a97\u53e3)\n   <\/p>\n<\/blockquote>\n<p>\n   \u6700\u540e\uff0cWin Vista \u4f3c\u4e4e\u65e0\u6cd5\u901a\u8fc7\u53d1\u9001\u6d88\u606f\u4ea7\u751f\u7c7b\u4f3c\u7684\u7a97\u53e3\u5c42\u6b21\u3002\n  <\/p>\n<p>\n   \u6211\u4eec\u53d1\u73b0 SHELLDLL_DefView \u53ca\u5176\u4e0b\u9762\u7684\u684c\u9762\u56fe\u6807\u7a97\u53e3\u6210\u4e3a\u4e00\u4e2a WorkerW \u7a97\u53e3\u7684\u5b50\u7a97\u53e3\uff08\u6211\u4eec\u79f0 WorkerW 1\uff09\uff0c\u548c\u7b2c\u4e00\u4e2a WorkerW \u540c\u7ea7\u4f46 Z \u5e8f\u4f4d\u4e8e\u4e0b\u65b9\u7684 WorkerW \u7a97\u53e3\uff08\u6211\u4eec\u79f0 WorkerW 2\uff09\uff0c\u5728Win 8\u81f3 Win 11\u4e0a\u58c1\u7eb8\u7a97\u53e3\u8bbe\u4e3a\u4e86 WokerW 2 \u7684\u5b50\u7a97\u53e3\uff0c\u800c\u5728 Win 7 \u4e0a\u5219\u8bbe\u7f6e\u4e3a Progman \u7684\u5b50\u7a97\u53e3\u3002\n  <\/p>\n<p>\n   \u4ece Spy ++ \u8fd4\u56de\u7684\u4fe1\u606f\u6765\u770b\uff0cWorkerW \u548c Progman \u90fd\u662f\u00a0NULL\uff0c\u4e5f\u5c31\u662f\u8bf4\u5b83\u4eec\u662f\u684c\u9762\u9876\u7ea7\u7a97\u53e3\uff0c\u6ca1\u6709\u7236\u7a97\u53e3\u548c\u6240\u6709\u8005\u7a97\u53e3\u3002\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u5728 Win 7 \u4e0b\u7528 Spy++ \u5206\u522b\u770b WorkerW 1\u3001WorkerW 2 \u7684\u7a97\u53e3\u6837\u5f0f\uff0c\u4f1a\u53d1\u73b0 WorkerW 2 \u662f\u4e00\u4e2a Popup \u7a97\u53e3\uff0c\u5176 Parent \u662f Progman \u7a97\u53e3 \uff0c\u5176\u4e0a\u4e00\u4e2a\u7a97\u53e3\u53e5\u67c4\u662f WorkerW 1\u3002 WokerW 1 \u7a97\u53e3\u4e5f\u662f\u4e00\u4e2aPopup \u7a97\u53e3\uff0c\u5176\u7236\u7a97\u53e3\u663e\u793a\u65e0\uff0c\u4f46\u662f\u5176\u4e0b\u4e00\u4e2a\u7a97\u53e3\u663e\u793a\u7684\u53e5\u67c4\u6b63\u597d\u662f WokerW 2\u3002\u6b64\u65f6\u8fd9\u4e09\u4e2a\u7a97\u53e3Z\u5e8f\u5f88\u660e\u663e\u4e86\uff1a<br \/>\n   <strong><br \/>\n    WorkerW1 &gt; WorkerW2 &gt; Progman<br \/>\n   <\/strong><br \/>\n   \u7a97\u53e3\u3002\n  <\/p>\n<p>\n   \u5728\u5206\u6790\u7a97\u53e3\u6837\u5f0f\u7684\u65f6\u5019\u6211\u8fd8\u53d1\u73b0\u4e00\u4e2a\u6709\u8da3\u7684\u73b0\u8c61\uff1a\n  <\/p>\n<p>\n   \u6bd4\u5982\u5728 Win 11 \u4e0b\uff0cWorkerW 2 \u7684\u6269\u5c55\u6837\u5f0f\u4e2d\u6709\u4e00\u4e2a\u53eb<br \/>\n   <strong><br \/>\n    WS_EX_TRANSPARENT<br \/>\n   <\/strong><br \/>\n   \u7684\u7a97\u53e3\u6837\u5f0f\uff0c\u800c\u5728 WorkerW 1 \u4e0b\u5219\u6ca1\u6709\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<div class=\"img-center\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<p>\n   \u5bf9\u4e8e<br \/>\n   <strong><br \/>\n    WS_EX_TRANSPARENT<br \/>\n   <\/strong><br \/>\n   \u6837\u5f0f\uff0cMSDN \u662f\u8fd9\u6837\u8bf4\u7684\uff0c\u00a0\u5728\u7a97\u53e3\u4e0b\u65b9\uff08\u7531\u540c\u4e00\u4e2a\u7ebf\u7a0b\u521b\u5efa\uff09\u7684\u5144\u5f1f\u7a97\u53e3\u88ab\u7ed8\u5236\u4e4b\u524d\uff0c\u4e0d\u5e94\u8be5\u5bf9\u7a97\u53e3\u8fdb\u884c\u7ed8\u5236\u3002\u7a97\u53e3\u663e\u793a\u4e3a\u900f\u660e\uff0c\u56e0\u4e3a\u5e95\u5c42\u5144\u5f1f\u7a97\u53e3\u7684\u4f4d\u5df2\u7ecf\u88ab\u7ed8\u5236\u3002\u8981\u5728\u6ca1\u6709\u8fd9\u4e9b\u9650\u5236\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0\u900f\u660e\u5ea6\uff0c\u8bf7\u4f7f\u7528<br \/>\n   <a href=\"https:\/\/docs.microsoft.com\/windows\/desktop\/api\/winuser\/nf-winuser-setwindowrgn\" rel=\"nofollow\" title=\"\u00a0SetWindowRgn\"><br \/>\n    SetWindowRgn<br \/>\n   <\/a><br \/>\n   \u51fd\u6570\u3002\n  <\/p>\n<p>\n   \u4e5f\u5c31\u662f\u8bf4\u8fd9\u4e2a\u6269\u5c55\u6837\u5f0f\uff0c\u53ef\u4ee5\u5b9e\u73b0\u9f20\u6807\u7a7f\u900f\uff08\u7a97\u53e3\u7684\u7a7f\u900f\u6027\u8d28\u548c\u900f\u660e\u5ea6\u4e4b\u95f4\u7684\u5173\u7cfb\u53ef\u4ee5\u770b<br \/>\n   <a class=\"link-info\" href=\"https:\/\/www.cnblogs.com\/xnzzj\/p\/4524085.html\" rel=\"nofollow\" title=\"\u6587\u7ae0\"><br \/>\n    \u6587\u7ae0<br \/>\n   <\/a><br \/>\n   \uff09\u3002\n  <\/p>\n<p>\n   \u518d\u770b\u770b Win 7 \u4e0b\u7684\u7a97\u53e3\u6837\u5f0f\uff1a\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u53ef\u4ee5\u770b\u5230 WorkerW \u4e0d\u4ec5\u6709\u9f20\u6807\u7a7f\u900f\uff0c\u8fd8\u6709 WS_EX_LAYERED \u5206\u5c42\u7a97\u53e3\u6837\u5f0f\u3002\u7528 GetLayeredWindowAttributes \u51fd\u6570\u68c0\u7d22\u900f\u660e\u5ea6\u65f6\u5019\u8c03\u7528\u5931\u8d25\uff0c\u731c\u6d4b\u7a97\u53e3\u662f\u4f7f\u7528UpdateLayeredWindow \u5b9e\u73b0\u900f\u660e\u5ea6\u7684\u3002\u4f46\u662fWin 7\/8\u4e0a\uff0cWorkerW 1 \u5e76\u4e0d\u662f\u900f\u660e\u7684\uff0c\u4f1a\u906e\u6321 WorkerW 2\uff0c\u5728 Win 8.1 \u53ca\u4ee5\u4e0a\u5219\u4e0d\u906e\u6321\uff0c\u5355\u7eaf\u4ece\u7a97\u53e3\u6837\u5f0f\u4e0a\u5f88\u96be\u5224\u65ad\u7a97\u53e3\u662f\u5426\u900f\u660e\u3002\n  <\/p>\n<p>\n   WorkerW 1\u3001WorkerW 2 \u548c Progman \u7a97\u53e3\u4e00\u6837\u90fd\u5c5e\u4e8e explorer.exe \u8fdb\u7a0b\u7684\u7a97\u53e3\u3002\u5b9e\u9645\u4e0a\u60f3\u8981\u5c06\u81ea\u5df1\u7684\u7a97\u53e3\u5d4c\u5165\u5230 Windows \u684c\u9762\u56fe\u6807\u4e0b\u65b9\uff0c\u684c\u9762\u7684\u7a97\u53e3\u5c42\u6b21\u4e00\u5b9a\u8981\u6b63\u786e\uff0c\u5e76\u4e14\u8981\u4fdd\u8bc1\u9ad8 Z \u5e8f\u7a97\u53e3\u662f\u900f\u660e\u7684\u3002\u603b\u7ed3\u4ee5\u4e0a\u5206\u6790\uff0cWin 7\/8 \u7a97\u53e3\u5e94\u5d4c\u5165 Progman \u5e76\u4e14<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u9690\u85cf WorkerW 2<br \/>\n   <\/span><br \/>\n   \uff1bWin 8.1\u5f00\u59cb\u7684\u7cfb\u7edf\u4e0a\uff0c\u7a97\u53e3\u5e94\u5d4c\u5165 WorkerW 2 \u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u7528\u5d4c\u5165\u7a97\u53e3\u7684\u65b9\u5f0f\u5b9e\u73b0\u52a8\u6001\u58c1\u7eb8\uff0c\u53ea\u80fd\u5728 WIn7 \u53ca\u5176\u4ee5\u4e0a\u7cfb\u7edf\u4e0a\u5b9e\u73b0\uff0cVista\/XP \u4ee5\u53ca\u66f4\u65e9\u7684\u7cfb\u7edf\u65e0\u6cd5\u4ea7\u751f\u8fd9\u79cd\u900f\u660e\u7684\u7a97\u53e3\u5c42\u6b21\uff0c XP\u662f\u6ca1\u6709 DWM \u6846\u67b6\u4e14\u7a97\u53e3\u4e0d\u900f\u660e\uff0cVista \u662f\u65e9\u671f\u7684 DWM \u6709\u4e9b\u529f\u80fd\u4e0d\u652f\u6301\uff0c\u5bfc\u81f4\u65e0\u6cd5\u7528 Worker \u5206\u5c42\u7a97\u53e3\u5d4c\u5165\u58c1\u7eb8\u7a97\u53e3\u3002\n  <\/p>\n<h4 id=\"2.2%20%E5%A6%82%E4%BD%95%E5%BD%A2%E6%88%90%20WorkerW%20%E5%88%86%E5%B1%82%E7%AA%97%E5%8F%A3\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.2 \u5982\u4f55\u5f62\u6210 WorkerW \u5206\u5c42\u7a97\u53e3<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   WorkerW \u5206\u5c42\u7a97\u53e3\u7528\u4e8e\u5728\u5207\u6362\u684c\u9762\u65f6\u4ea7\u751f\u6de1\u5165\u6de1\u51fa\u52a8\u753b\uff0c\u8fd9\u4e3b\u8981\u901a\u8fc7\u5728\u540d\u4e3a WorkerW \u7684\u5e73\u6ed1\u79fb\u52a8\u7a97\u53e3\u4e0a\u7ed8\u5236\u684c\u9762 Progman \u7a97\u53e3\u7684 HDC \u4fe1\u606f\u5f97\u5230\u3002\u8fd9\u79cd\u7a97\u53e3\u662f\u5ef6\u65f6\u4ea7\u751f\u7684\uff0c\u6700\u5178\u578b\u7684\u662f\u5728 Win 7 SP3 \u4e0a\u66f4\u6539\u663e\u793a\u5668\u914d\u8272\u65b9\u6848\u65f6 \u4ee5\u53ca Win 10 \u7b49\u6253\u5f00\u201c\u4efb\u52a1\u89c6\u56fe\u201d\u65f6\u3002\u4e0b\u9762\u6f14\u793a\u4e24\u79cd\u60c5\u51b5\u4e0b\u7a97\u53e3\u5c42\u6b21\u662f\u5982\u4f55\u4ea7\u751f\u7684\u3002\n  <\/p>\n<p>\n   <strong><br \/>\n    <span style=\"color:#956fe7\"><br \/>\n     \uff081\uff09\u5728 Win 7 SP3 \u4e0a\u66f4\u6539\u663e\u793a\u5668\u914d\u8272\u65b9\u6848<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u4f7f\u7528 Spy ++ \u76d1\u89c6\u7a97\u53e3\u6d88\u606f\uff0c\u5f53\u66f4\u6539\u663e\u793a\u5668\u914d\u8272\u65b9\u6848\u65f6\uff0c\u7cfb\u7edf\u4f1a\u8c03\u7528 PostMessage \u51fd\u6570\uff0c\u5e76\u53d1\u9001\u4e00\u6761\u672a\u516c\u5f00\u7684 WindowsMessage\uff0c\u5373 0x052C (WM_SHELLPARENTCHANGING)\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Windows Basic<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Windows Aero<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Aero Activated<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   <strong><br \/>\n    <span style=\"color:#956fe7\"><br \/>\n     \uff082\uff09\u5728 Win 11 \u4e0a\u76d1\u89c6 Progman\uff0c\u5e76\u6253\u5f00\u548c\u5173\u95ed\u201c\u4efb\u52a1\u89c6\u56fe\u201d\u6309\u94ae<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u53ef\u4ee5\u89c2\u5bdf\u5230\uff0c\u6253\u5f00\u201c\u4efb\u52a1\u89c6\u56fe\u201d\u7684\u65f6\u5019\uff0cwParam \u662f 0x0D\uff0clParam \u662f 0x01\uff0c\u5173\u95ed\u65f6\u5219\u662f 0x0.\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u76ee\u524d\u770b\u6765\uff0c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a Param \u53c2\u6570\u7684\u529f\u80fd\u4e0d\u592a\u4e00\u81f4\uff0c\u8fd9\u9700\u8981\u66f4\u4e3a\u8be6\u7ec6\u7684\u7814\u7a76\u3002\n  <\/p>\n<p>\n   \u5efa\u8bae\u4f7f\u7528\u5177\u6709\u8d85\u65f6\u53d1\u9001\u7684 SendMessageTimeout \u51fd\u6570\uff0c\u5e76\u5728\u6307\u5b9a\u7684\u7cfb\u7edf\u7248\u672c\u4e0a\u4f7f\u7528\u4ee5\u4e0b\u5efa\u8bae\u7684\u53c2\u6570\u6570\u503c\u53d1\u9001\u6d88\u606f\u3002\n  <\/p>\n<p>\n   <strong><br \/>\n    [2024.08.17 \u66f4\u65b0]<br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u4e0b\u9762\u7684\u66f4\u65b0\u5185\u5bb9\u6839\u636e<br \/>\n   <a href=\"https:\/\/github.com\/valinet\/ExplorerPatcher\/issues\/525\" title=\"https:\/\/github.com\/valinet\/ExplorerPatcher\/issues\/525\"><br \/>\n    https:\/\/github.com\/valinet\/ExplorerPatcher\/issues\/525<br \/>\n   <\/a><br \/>\n   \u7684\u7814\u7a76\u6240\u5f97\u3002\u5728 Win11\u4e0a\u9700\u8981\u786e\u4fdd Program \u7a97\u53e3\u5b8c\u5168\u521d\u59cb\u5316\u540e\u624d\u80fd\u53d1\u9001\u6d88\u606f\u751f\u6210 WorkerW\uff0c\u56e0\u4e3a 0x052C \u7684\u96f6\u53c2\u6570\u6d88\u606f\u662f\u5f02\u6b65\u7684\uff0c\u6709\u4e9b\u673a\u5668\u4e0a\u53ef\u80fd\u56e0\u4e3a\u6027\u80fd\u539f\u56e0\u5c06\u663e\u73b0\u51fa\u95ee\u9898\u3002\u5fc5\u987b\u9996\u5148\u8c03\u7528 0x052C \u5e76\u6307\u5b9a 0xA(10) \u6216 0xB(11)\u3002\n  <\/p>\n<p>\n   \u539f\u6587\uff08<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u8b66\u544a\u7ecf\u8fc7\u6d4b\u8bd5\u68c0\u6d4b\u529f\u80fd\u7684\u51fd\u6570\u65e9\u671f\u7cfb\u7edf\u662f\u6ca1\u6709\u7684\uff0c\u5f88\u53ef\u80fd\u662f\u6700\u8fd1\u7684 Win10 \u624d\u5f00\u59cb\u6709<br \/>\n   <\/span><br \/>\n   \uff09\uff1a\n  <\/p>\n<blockquote><p>\n   <strong><br \/>\n    <a href=\"https:\/\/github.com\/jdp1024\" title=\"jdp1024\"><br \/>\n     jdp1024<br \/>\n    <\/a><br \/>\n   <\/strong><br \/>\n   commented<br \/>\n   <a href=\"https:\/\/github.com\/valinet\/ExplorerPatcher\/issues\/525#issuecomment-999067006\" id=\"issuecomment-999067006-permalink\" title=\"on Dec 22, 2021\"><br \/>\n    on Dec 22, 2021<br \/>\n   <\/a><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p>\n        You can have a look into<br \/>\n        <code><br \/>\n         CDesktopBrowser::_OnWallpaperUpdate<br \/>\n        <\/code><br \/>\n        which is called by<br \/>\n        <code><br \/>\n         CDesktopBrowser::_WndProcBS<br \/>\n        <\/code><br \/>\n        , there is something interesting.\n       <\/p>\n<p>\n        If<br \/>\n        <code><br \/>\n         wParam<br \/>\n        <\/code><br \/>\n        is 10 or 11 and msg is<br \/>\n        <code><br \/>\n         0x52c<br \/>\n        <\/code><br \/>\n        ,<br \/>\n        <code><br \/>\n         CDesktopBrowser::_IsDesktopWallpaperInitialized<br \/>\n        <\/code><br \/>\n        is called and<br \/>\n        <code><br \/>\n         0x80004005<br \/>\n        <\/code><br \/>\n        will be returned if<br \/>\n        <code><br \/>\n         _IsDesktopWallpaperInitialized<br \/>\n        <\/code><br \/>\n        returns<br \/>\n        <code><br \/>\n         FALSE<br \/>\n        <\/code><br \/>\n        .\n       <\/p>\n<\/p>\n<p>\n        \u3010\u7ffb\u8bd1\u3011\u4f60\u53ef\u4ee5\u68c0\u67e5\u6b63\u5728\u88ab CDesktopBrowser::_WndProcBS \u8c03\u7528\u7684\u00a0CDesktopBrowser::_OnWallpaperUpdate\uff0c\u90a3\u91cc\u6709\u4e00\u4e9b\u6709\u8da3\u7684\u4e1c\u897f\u3002\n       <\/p>\n<p>\n        \u5982\u679c\u6d88\u606f\u662f 0x52c \u5e76\u4e14 wParam \u662f 10 \u6216\u8005 11\uff0cCDesktopBrowser::_IsDesktopWallpaperInitialized \u51fd\u6570\u5c06\u88ab\u8c03\u7528\u4ee5\u68c0\u67e5\u684c\u9762\u521d\u59cb\u5316\u72b6\u6001\uff0c\u5f53\u00a0_IsDesktopWallpaperInitialized \u8fd4\u56de FALSE \u65f6\uff0c\u6d88\u606f\u5904\u7406\u5c06\u8fd4\u56de\u9519\u8bef\u4ee3\u7801\u00a00x80004005\u3002\n       <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/blockquote>\n<p>\n   \u8fd9\u6837\u7684\u68c0\u67e5\u5c06\u907f\u514d\u4f7f\u7528\u4e0d\u786e\u5b9a\u7684\u505a\u6cd5\uff0c\u5982 Sleep \u8fdb\u884c\u5ef6\u8fdf\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">BOOL sws_WindowHelpers_EnsureWallpaperHWND()\n{\n    \/\/ See: https:\/\/github.com\/valinet\/ExplorerPatcher\/issues\/525\n\tHWND progman = GetShellWindow();\n\tif (progman)\n\t{\n\t\tPDWORD_PTR res0 = -1, res1 = -1, res2 = -1, res3 = -1;\n\t\t\/\/ Call CDesktopBrowser::_IsDesktopWallpaperInitialized\n\t\tSendMessageTimeoutW(progman, 0x052C, 0xA, 0, SMTO_NORMAL, 1000, &amp;res0);\n\t\tif (FAILED(res0))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\/\/ Prepare to generate wallpaper window\n\t\tSendMessageTimeoutW(progman, 0x052C, 0xD, 0, SMTO_NORMAL, 1000, &amp;res1);\n\t\tSendMessageTimeoutW(progman, 0x052C, 0XD, 1, SMTO_NORMAL, 1000, &amp;res2);\n\t\t\/\/ \"Animate desktop\", which will make sure the wallpaper window is there\n\t\tSendMessageTimeoutW(progman, 0x052C, 0, 0, SMTO_NORMAL, 1000, &amp;res3);  \/\/ 0 \u53c2\u6570\u662f\u5fc5\u987b\u7684\uff0c\u5bf9\u4e8e\u65e9\u671f\u7cfb\u7edf(win7) 0xD \u53c2\u6570\u4f1a\u5bfc\u81f4\u5904\u7406\u5931\u8d25\u3002\n\t\t\/\/printf(\"[sws] Wallpaper results: %d %d %d\\n\", res1, res2, res3);\t\t\n\t\treturn !res1 &amp;&amp; !res2 &amp;&amp; !res3;\n\t}\n\treturn FALSE;\n}<\/code><\/pre>\n<p>\n   SendMessageTimeout \u51fd\u6570\u6700\u65e9\u88ab\u63d0\u51fa\u53ea\u9700\u8981\u53d1\u9001 0x052C \u6d88\u606f\u5373\u53ef\uff0c\u4f46\u4e8b\u5b9e\u5e76\u4e0d\u5168\u90e8\u5982\u6b64\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">SendMessageTimeoutW(progman, 0x052C, 0, 0, SMTO_NORMAL, 0x03E8, &amp;res3);<\/code><\/pre>\n<p>\n   \u5176\u4e2d\uff0c\u524d 4 \u4e2a\u53c2\u6570\u548c<br \/>\n   <strong><br \/>\n    SendMessage<br \/>\n   <\/strong><br \/>\n   \u76f8\u540c\uff0c\u540e\u9762\u53c2\u6570\u662f\u63a7\u5236\u8d85\u65f6\u7684\uff0c0x03E8 \u7b49\u540c\u4e8e\u5341\u8fdb\u5236\u76841000\uff0c\u8868\u793a\u7b49\u5f85\u8d85\u65f6\u65f6\u95f4\u662f 1000 \u6beb\u79d2\u3002\n  <\/p>\n<h2 id=\"%E4%BA%8C%E3%80%81%E4%BD%BF%E7%94%A8%E6%AD%A5%E9%AA%A4\">\n   <a id=\"_19\"><br \/>\n   <\/a><br \/>\n   <span style=\"color:#0d0016\"><br \/>\n    \u4e09\u3001\u5b9e\u6218&amp;\u7f16\u5199\u4ee3\u7801<br \/>\n   <\/span><br \/>\n  <\/h2>\n<h3 id=\"1.%E5%BC%95%E5%85%A5%E5%BA%93\">\n   <a id=\"1_20\"><br \/>\n   <\/a><br \/>\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     1. \u5982\u4f55\u4e3a\u5d4c\u5165<br \/>\n    <\/strong><br \/>\n    \u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3<br \/>\n    <strong><br \/>\n     \u505a\u597d\u51c6\u5907\uff1f<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n  <\/h3>\n<p>\n   \u53ea\u8981\u80fd\u5c06\u6211\u4eec\u81ea\u5df1\u7684\u7a97\u53e3\u5d4c\u5165\u5230 Windows \u56fe\u6807\u4e0b\u9762\u5e76\u4e14\u53ef\u89c6\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5728\u7a97\u53e3\u4e0a\u5f15\u5165\u52a8\u753b\u4e86\uff01\n  <\/p>\n<h4 id=\"1.1.%20%E7%A1%AE%E4%BF%9D%E5%B7%B2%E7%BB%8F%E5%90%AF%E5%8A%A8%20DWM%20%E7%AA%97%E5%8F%A3%E5%90%88%E6%88%90\">\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     1.1. \u786e\u4fdd\u5df2\u7ecf\u542f\u52a8 DWM \u7a97\u53e3\u5408\u6210<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n  <\/h4>\n<blockquote>\n<p>\n    <strong><br \/>\n     <span style=\"color:#fe2c24\"><br \/>\n      2024.06.06<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff1a\u6700\u65b0\u7814\u7a76\u53d1\u73b0\uff0c\u53ea\u901a\u8fc7 DwmIsCompositionEnabled \u51fd\u6570\u548c\u670d\u52a1\u8fdb\u7a0b\u72b6\u6001\u6765\u68c0\u67e5\u662f\u5426\u542f\u7528\u4e86\u7a97\u53e3\u5408\u6210\u662f\u4e0d\u7cbe\u786e\u7684\uff0c\u5f53\u5728\u4f7f\u7528\u7c7b\u4f3c Basic \u4e3b\u9898\uff08\u901a\u8fc7\u4e00\u4e2a\u6ca1\u6709\u6587\u6863\u5316\u7684 API \u64cd\u4f5c\u4e86 DWM \u5185\u90e8\u6570\u636e\uff09\u6216\u8005\u5728\u6ce8\u518c\u8868\u548c\u7ec4\u7b56\u7565\u4e2d\u5173\u95ed\u4e86\u7a97\u53e3\u5408\u6210\uff0c\u5c06\u5bf9\u4f7f\u7528\u8be5 API \u7684\u7b80\u5355\u68c0\u6d4b\u4ea7\u751f\u9003\u9038\uff0c\u5bfc\u81f4 0x052C \u4e0d\u80fd\u6b63\u5e38\u4ea7\u751f\u52a8\u4f5c\u3002\u4f5c\u8005\u5c06\u5728\u672a\u6765\u66f4\u65b0\u6b64\u90e8\u5206\u7684\u73af\u5883\u68c0\u6d4b\u7b56\u7565\u3002<br \/>\n     <strong><br \/>\n      [\u622a\u81f3\u76ee\u524d\u672a\u5b8c\u5168\u5728\u66f4\u65b0\u4e2d\u89e3\u51b3]<br \/>\n     <\/strong><br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u60f3\u8ba9\u81ea\u5df1\u7684\u7a97\u53e3\u5d4c\u5165\u5230\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u4e0b\u9762\u4e0d\u88ab\u906e\u6321\uff0c\u4f60\u5fc5\u987b\u8ba9\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u53d8\u6210\u900f\u660e\u3002\u8bf4\u5230\u7a97\u53e3\u900f\u660e\uff0c\u505a\u8fc7\u5ba2\u6237\u7aef\u7684\u7a0b\u5e8f\u5458\u53ef\u80fd\u4f1a\u60f3\u5230 Windows \u7684 Layerd \u7a97\u53e3\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u7528 Spy ++ \u53bb\u770b WorkerW 1 \u7a97\u53e3\u6837\u5f0f\uff0c \u4ed6\u5e76\u4e0d\u5305\u542b WS_EX_LAYERD \u98ce\u683c\u3002\u800c\u4e14\u6709\u4e2a\u91cd\u8981\u7684\u95ee\u9898\uff0c\u5982\u679c Layerd \u7a97\u53e3\u91c7\u7528 SetLayeredWindowAttributes \u8bbe\u7f6e\u4e3a\u5168\u900f\u660e\u7a97\u53e3\uff0c\u5219\u5176\u5b50\u7a97\u53e3\u4e5f\u4f1a\u4e0d\u53ef\u89c1\u3002\u6b64\u5916\uff0c\u4f7f\u7528 UpdateLayerdWindow \u5b9e\u73b0\u7684\u900f\u660e\u7a97\u53e3\uff0c\u5b8c\u5168\u900f\u660e\u7684\u5730\u65b9\u9f20\u6807\u5c06\u4f1a\u7a7f\u900f\u3002\u800c\u7528 Spy++ \u67e5\u770b\u684c\u9762\u7684 SysListView32 \u7a97\u53e3\uff0c\u5b83\u662f\u53ef\u4ee5\u6536\u5230\u5404\u79cd\u9f20\u6807\u6d88\u606f\u3002\u90a3\u4e48\uff0c\u5c06\u539f\u672c Progman \u7684\u5b50\u7a97\u53e3 SHELLDLL_DefView\uff08\u62e5\u6709\u7c7b\u540d\u4e3a SysListView32 \u7684\u684c\u9762\u7ba1\u7406\u5c42\u56fe\u6807\u7a97\u53e3\uff09\u53d8\u6210 WorkerW 1 \u7684\u5b50\u7a97\u53e3\uff0c\u5e76\u4e14\u8ba9WorkerW 1 \u4e2d\u9664\u4e86\u684c\u9762\u56fe\u6807\u90e8\u5206\u5176\u4ed6\u5730\u65b9\u90fd\u662f\u900f\u660e\u7684\uff0c\u8fd9\u4e2a\u662f\u600e\u4e48\u5b9e\u73b0\u7684\u5462\uff1f\u5b9e\u9645\u4e0a WorkerW 1\u00a0\u7a97\u53e3\u8fd9\u79cd\u900f\u660e\u6548\u679c\u662f\u7531 DWM( Desktop Window Manager) \u6765\u63a7\u5236\u7684\uff08\u5982\u4f55\u5b9e\u73b0\u900f\u660e\u540e\u6587\u4f1a\u8bf4\uff09\u3002\n  <\/p>\n<p>\n   Desktop Window Manager\uff0c\u5b83\u662f Vista \u4e4b\u540e\u624d\u51fa\u73b0\u7684\u4e00\u4e2a\u65b0\u7684\u7cfb\u7edf\u7ec4\u4ef6\uff0c\u5b83\u7684\u8fdb\u7a0b\u540d\u662fdwm.exe\u3002\u5728 Win8 \u53ca\u4ee5\u4e0a\u7cfb\u7edf\uff0c\u5b83\u4f1a\u968f\u7cfb\u7edf\u81ea\u52a8\u542f\u52a8\uff0c \u5e76\u4e14\u4e00\u76f4\u8fd0\u884c\u3002\u5728 Vista\/Win7 \u7cfb\u7edf\u4e2d\uff0c\u4e00\u822c\u6211\u4eec\u5728\u4f7f\u7528 Aero \u4e3b\u9898\u7684\u65f6\u5019\u624d\u4f1a\u542f\u52a8\u8fd9\u4e2a\u670d\u52a1\u3002\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u4e86 Desktop Window Manager \u76f8\u5173\u7684 API \uff0c\u76f8\u5173\u63a5\u53e3\u90fd\u5728 dwmapi.dll \u4e2d\u3002DWM API \u5141\u8bb8\u6211\u4eec\u8bbe\u7f6e\u7a97\u4f53\u5728\u4e0e\u5176\u4ed6\u7a97\u4f53\u7ec4\u5408\/\u91cd\u53e0\u65f6\u5019\u7684\u663e\u793a\u7279\u6548\uff0c\u5982\u5168\u900f\u660e\u3001\u534a\u900f\u660e\u3001\u6a21\u7cca\u7b49\u6548\u679c\u3002\n  <\/p>\n<p>\n   \u6240\u4ee5\u56de\u5230\u5728\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u5d4c\u5165\u7a97\u53e3\u7684\u95ee\u9898\uff0c\u5728 Win 7\/8 \u4e0a\uff0c\u6211\u4eec\u9996\u5148\u8981\u5224\u65ad<br \/>\n   <strong><br \/>\n    DWM Compositon<br \/>\n   <\/strong><br \/>\n   \u662f\u5426\u5f00\u542f\uff0c\u5982\u679c\u88ab\u7981\u6b62\uff0c\u5219\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u5c42\u6b21\u662f\u4e0d\u6ee1\u8db3\u8981\u6c42\u7684\uff0cDWM API \u63d0\u4f9b<br \/>\n   <strong><br \/>\n    DwmIsCompositionEnabled<br \/>\n   <\/strong><br \/>\n   \u51fd\u6570\u6765\u5224\u65ad<br \/>\n   <strong><br \/>\n    DWM Composition<br \/>\n   <\/strong><br \/>\n   \u662f\u5426\u542f\u7528\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">BOOL IsDwmCompositionEnabled()\n{\n\t\/\/ \u6ce8\u610f\u8fd9DWM API\u5728Vista\/Win7\u7cfb\u7edf\u4ee5\u4e0a\u624d\u6709\u7684\n\t\/\/ win8\/win10\u662f\u4e0d\u9700\u8981\u5224\u65ad\u7684\u4f1a\u4e00\u76f4\u8fd4\u56deTRUE\n\tBOOL bEnabled = FALSE;\n\ttypedef HRESULT(__stdcall *fnDwmIsCompositionEnabled)(BOOL* pfEnabled);\n\tHMODULE hModuleDwm = LoadLibraryA(\"dwmapi.dll\");\n\tif (hModuleDwm != 0)\n\t{\n\t\tfnDwmIsCompositionEnabled pFunc = (fnDwmIsCompositionEnabled)GetProcAddress(hModuleDwm, \"DwmIsCompositionEnabled\");\n\t\tif (pFunc != 0)\n\t\t{\n\t\t\tBOOL result = FALSE;\n\t\t\tif (pFunc(&amp;result) == S_OK)\n\t\t\t{\n\t\t\t\tbEnabled = result;\n\t\t\t}\n\t\t}\n        else\n        {\n            SetLastError(ERROR_ACCESS_DENIED);\n            bEnabled = TRUE;\n        }\n\n\t\tFreeLibrary(hModuleDwm);\n\t\thModuleDwm = 0;\n\t}\n\treturn bEnabled;\n}\n<\/code><\/pre>\n<p>\n   \u5982\u679c DWM Composition \u672a\u542f\u7528\u53ef\u4ee5\u4f7f\u7528 DwmEnableComposition \u542f\u7528\u5b83\uff0c\u8fd9\u4e2a\u51fd\u6570\u53c2\u6570\u6709\u4e24\u4e2a\u9009\u62e9\uff0c<br \/>\n   <strong><br \/>\n    DWM_EC_ENABLECOMPOSITION<br \/>\n   <\/strong><br \/>\n   \uff0cWin 7 \u4e0b\u5c06\u542f\u7528\u9ed8\u8ba4\u7684Aero \u4e3b\u9898;<br \/>\n   <strong><br \/>\n    DWM_EC_DISABLECOMPOSITION<br \/>\n   <\/strong><br \/>\n   \uff0cWin 7 \u4e0b\u5c06\u542f\u7528Windows 7 Basic \u4e3b\u9898\u3002\n  <\/p>\n<p>\n   \u6837\u4f8b\u4ee3\u7801\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">\/*\nHRESULT DwmEnableComposition(\n  UINT uCompositionAction\n);\n*\/\n\n#include &lt;dwmapi.h&gt;\n#pragma comment(lib, \"dwmapi.lib\")\n\n\/\/ S1: \n...\nHRESULT hr_db = S_OK;\n\n\/\/ Disable DWM Composition \nhr_db = DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);\nif (SUCCEEDED(hr_db))\n{\n   \/\/ ...\n}\n...\n\n\/\/ S2: \n\n...\nHRESULT hr_eb = S_OK;\n\n\/\/ Enable DWM Composition \nhr_eb = DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);\nif (SUCCEEDED(hr_eb))\n{\n   \/\/ ...\n}\n...<\/code><\/pre>\n<p>\n   \u4f46\u662f\uff0c\u5728\u5b9e\u9645\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\u53d1\u73b0\uff0c\u5982\u679c Uxsms \u670d\u52a1\u6ca1\u6709\u542f\u52a8\uff0c\u5219 DwmEnableComposition \u59cb\u7ec8\u5931\u8d25\uff0c\u5982\u679c dwm.exe \u8fdb\u7a0b\u5d29\u6e83\uff0c\u4f46\u00a0Uxsms \u670d\u52a1\u53ef\u80fd\u4f9d\u7136\u6b63\u5e38\u8fd0\u884c\uff0c\u8fd9\u8bf4\u660e Uxsms \u670d\u52a1\u76f8\u5f53\u4e8e\u52a0\u8f7d\u5668\uff0c\u6211\u4eec\u9700\u8981\u5728\u8c03\u7528\u7a97\u53e3\u5408\u6210\u4e4b\u524d\u68c0\u67e5 dwm.exe \u662f\u5426\u6b63\u5728\u8fd0\u884c\uff0c\u5982\u679c\u6ca1\u6709\u8fd0\u884c\u5c31\u5c1d\u8bd5\u91cd\u542f Uxsms \u670d\u52a1\uff0c\u7136\u540e\u518d\u8c03\u7528\u542f\u7528\u7a97\u53e3\u5408\u6210 \u7684\u51fd\u6570\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">DWORD FindProcessIDByName(LPCWSTR processName)\n{\n    DWORD processId = 0;\n    HANDLE hProcessSnap;\n    PROCESSENTRY32W pe32{};\n    pe32.dwSize = sizeof(PROCESSENTRY32W);\n    \n\n    hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);\n    if (hProcessSnap == INVALID_HANDLE_VALUE)\n    {\n        return(0);\n    }\n    \n    if (!Process32FirstW(hProcessSnap, &amp;pe32))\n    {\n        CloseHandle(hProcessSnap); \/\/ clean the snapshot object\n        return(0);\n    }\n    \n    do\n    {\n        if (!wcscmp(pe32.szExeFile, processName))\/\/\u8fdb\u7a0b\u540d\u79f0\n        {\n            processId = pe32.th32ProcessID;\/\/\u8fdb\u7a0bID\n            break;\n        }\n    } while (Process32NextW(hProcessSnap, &amp;pe32));\n\n    CloseHandle(hProcessSnap);\n\n    return processId;\n}\n\nBOOL QueryEnableDwmComposition()\n{\n    \/\/ \u6ce8\u610f DWM API \u5728 Vista\/Win7 \u7cfb\u7edf\u4ee5\u4e0a\u624d\u6709\n    \/\/ win8 \/ win10 \u662f\u4e0d\u9700\u8981\u5224\u65ad\u7684\u4f1a\u4e00\u76f4\u8fd4\u56de TRUE\n\n    BOOL bEnabled = FALSE;\n    typedef HRESULT(__stdcall* fnDwmIsCompositionEnabled)(BOOL* pfEnabled);\n    typedef HRESULT(__stdcall* fnDwmEnableComposition)(UINT uCompositionAction);\n\n    HMODULE hModuleDwm = LoadLibraryA(\"dwmapi.dll\");\n    if (hModuleDwm != 0)\n    {\n        auto pFuncIsEnabled =\n            (fnDwmIsCompositionEnabled)GetProcAddress(\n                hModuleDwm, \"DwmIsCompositionEnabled\");\n        auto pFuncEnableDwm =\n            (fnDwmEnableComposition)GetProcAddress(\n            hModuleDwm, \"DwmEnableComposition\");\n\n        if (pFuncIsEnabled != 0)\n        {\n            BOOL result = FALSE;\n            if (pFuncIsEnabled(&amp;result) == S_OK)\n            {\n                \/\/ \u6ca1\u6709\u542f\u52a8\u5c31\u542f\u52a8\u4e00\u4e0b\n                if(result == TRUE)\n                    bEnabled = TRUE;\n                else if (pFuncEnableDwm != 0)\n                {\n                    printf(\"[*] Attempt to start Dwm Service.\\n\");\n                    if (!FindProcessIDByName(L\"dwm.exe\"))\n                    {\n                        system(\"SC stop UxSms\");\n                        WaitForSingleObject(GetCurrentProcess(), 1500);\n                    }\n                    system(\"SC start UxSms\");\n                    WaitForSingleObject(GetCurrentProcess(), 500);\n                    \/\/ #define DWM_EC_ENABLECOMPOSITION 1\n                    if (pFuncEnableDwm(TRUE) == S_OK)\n                    {\n                        bEnabled = TRUE;\/\/ \u5224\u65ad\u542f\u52a8\u662f\u5426\u6210\u529f\n                    }\n                    else {\n                        SetLastError(ERROR_INTERNAL_ERROR);\n                    }\n                }\n            }\n        }\n        else {\n            SetLastError(ERROR_ACCESS_DENIED);\n            bEnabled = TRUE;\n        }\n\n        FreeLibrary(hModuleDwm);\n        hModuleDwm = 0;\n    }\n    return bEnabled;\n}<\/code><\/pre>\n<p>\n   \u66f4\u597d\u7684\u65b9\u6cd5\u662f\u4f7f\u7528 SCM \u914d\u7f6e\u51fd\u6570\u76d1\u89c6\u548c\u7ef4\u6301<br \/>\n   <strong><br \/>\n    UxSms<br \/>\n   <\/strong><br \/>\n   \u670d\u52a1\u8fdb\u7a0b\u7684\u542f\u52a8\u72b6\u6001\u3002\u8fd9\u91cc\u61d2\uff0c\u5c31\u7528 sc \u547d\u4ee4\u4ee3\u66ff\u4e86\u3002\n  <\/p>\n<p>\n   \u6d4b\u8bd5\u6548\u679c\uff1a\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    2024\/07\/09 \u66f4\u65b0\uff1a\u4f7f\u7528\u670d\u52a1\u63a7\u5236\u5668 API \u5b9e\u73b0\u7684\u72b6\u6001\u68c0\u67e5\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">\/\/ \u68c0\u67e5\u670d\u52a1\u72b6\u6001\nSERVICE_STATUS_PROCESS QueryServiceStatus(const WCHAR* serviceName) {\n    SERVICE_STATUS_PROCESS ssp = {};\n    SC_HANDLE hSCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);\n    if (hSCManager == NULL) {\n        std::wcerr &lt;&lt; L\"OpenSCManager failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        return ssp;\n    }\n\n    SC_HANDLE hService = OpenServiceW(hSCManager, serviceName, SERVICE_QUERY_STATUS);\n    if (hService == NULL) {\n        std::wcerr &lt;&lt; L\"OpenService failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        CloseServiceHandle(hSCManager);\n        return ssp;\n    }\n\n    DWORD dwBytesNeeded;\n    if (!QueryServiceStatusEx(hService, SC_STATUS_PROCESS_INFO, (LPBYTE)&amp;ssp, \n        sizeof(SERVICE_STATUS_PROCESS), &amp;dwBytesNeeded)) {\n        std::wcerr &lt;&lt; L\"QueryServiceStatusEx failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n    }\n\n    CloseServiceHandle(hService);\n    CloseServiceHandle(hSCManager);\n\n    return ssp;\n}\n\n\/\/ \u542f\u52a8\u670d\u52a1\nbool CStartService(const WCHAR* serviceName) {\n    SC_HANDLE hSCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);\n    if (hSCManager == NULL) {\n        std::wcerr &lt;&lt; L\"OpenSCManager failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        return false;\n    }\n\n    SC_HANDLE hService = OpenServiceW(hSCManager, serviceName, SERVICE_START);\n    if (hService == NULL) {\n        std::wcerr &lt;&lt; L\"OpenService failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        CloseServiceHandle(hSCManager);\n        return false;\n    }\n\n    if (!StartServiceW(hService, 0, NULL)) {\n        std::wcerr &lt;&lt; L\"StartService failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        CloseServiceHandle(hService);\n        CloseServiceHandle(hSCManager);\n        return false;\n    }\n\n    CloseServiceHandle(hService);\n    CloseServiceHandle(hSCManager);\n    return true;\n}\n\n\/\/ \u505c\u6b62\u670d\u52a1\nbool CStopService(const WCHAR* serviceName) {\n    SC_HANDLE hSCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);\n    if (hSCManager == NULL) {\n        std::wcerr &lt;&lt; L\"OpenSCManager failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        return false;\n    }\n\n    SC_HANDLE hService = OpenServiceW(hSCManager, serviceName, SERVICE_STOP);\n    if (hService == NULL) {\n        std::wcerr &lt;&lt; L\"OpenService failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        CloseServiceHandle(hSCManager);\n        return false;\n    }\n\n    SERVICE_STATUS status;\n    if (!ControlService(hService, SERVICE_CONTROL_STOP, &amp;status)) {\n        std::wcerr &lt;&lt; L\"ControlService failed, error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        CloseServiceHandle(hService);\n        CloseServiceHandle(hSCManager);\n        return false;\n    }\n\n    CloseServiceHandle(hService);\n    CloseServiceHandle(hSCManager);\n    return true;\n}\n\n\/\/ \u91cd\u65b0\u542f\u52a8\u670d\u52a1\nbool CRestartService(const WCHAR* serviceName) {\n    if (!CStopService(serviceName)) {\n        std::wcerr &lt;&lt; L\"Failed to stop service: \" &lt;&lt; serviceName &lt;&lt; std::endl;\n        return false;\n    }\n\n    Sleep(1000); \/\/ \u7b49\u5f85\u670d\u52a1\u5b8c\u5168\u505c\u6b62\n\n    if (!CStartService(serviceName)) {\n        std::wcerr &lt;&lt; L\"Failed to start service: \" &lt;&lt; serviceName &lt;&lt; std::endl;\n        return false;\n    }\n\n    return true;\n}\n\n\n\/\/ \u53ea\u6709 Win7 \u624d\u9700\u8981\u5224\u65ad\u7a97\u53e3\u5408\u6210\u662f\u5426\u542f\u7528\nBOOL QueryEnableDwmComposition()\n{\n    typedef HRESULT(__stdcall* fnDwmIsCompositionEnabled)(BOOL* pfEnabled);\n    typedef HRESULT(__stdcall* fnDwmEnableComposition)(UINT uCompositionAction);\n\n    HMODULE hModuleDwm = LoadLibraryW(L\"dwmapi.dll\");\n    if (hModuleDwm == 0) {\n        SetLastError(ERROR_MOD_NOT_FOUND);\n        return FALSE;\n    }\n    \n    auto pFuncIsEnabled =\n        (fnDwmIsCompositionEnabled)GetProcAddress(\n            hModuleDwm, \"DwmIsCompositionEnabled\");\n    auto pFuncEnableDwm =\n        (fnDwmEnableComposition)GetProcAddress(\n            hModuleDwm, \"DwmEnableComposition\");\n\n    if (!pFuncIsEnabled || !pFuncEnableDwm)\n    {\n        SetLastError(ERROR_ACCESS_DENIED);\n        FreeLibrary(hModuleDwm);\n        return FALSE;\n    }\n\n\n    BOOL bEnableComposition = FALSE;\n    if (pFuncIsEnabled(&amp;bEnableComposition) != S_OK)\n    {\n        FreeLibrary(hModuleDwm);\n        SetLastError(ERROR_INTERNAL_ERROR);\n        return FALSE;\n    }\n\n    \/\/ \u6ca1\u6709\u542f\u52a8\u5c31\u542f\u52a8\u4e00\u4e0b\n    if (!bEnableComposition) {\n        printf(\"[*] Attempt to start Dwm Service.\\n\");\n\n        \/\/ \u68c0\u67e5\u670d\u52a1\u72b6\u6001\n        const WCHAR* dwmSvcName = _T(\"UxSms\");\n        SERVICE_STATUS_PROCESS ssp = QueryServiceStatus(dwmSvcName);\n        if (ssp.dwCurrentState == SERVICE_STOPPED) {\n            std::wcout &lt;&lt; L\"DWM Service is stopped. Starting service...\" &lt;&lt; std::endl;\n            if (CStartService(dwmSvcName)) {\n                std::wcout &lt;&lt; L\"DWM Service started successfully.\" &lt;&lt; std::endl;\n            }\n        }\n        else if (ssp.dwCurrentState == SERVICE_RUNNING) {\n            std::wcout &lt;&lt; L\"Service is running. Restarting service...\" &lt;&lt; std::endl;\n            if (CRestartService(dwmSvcName)) {\n                std::wcout &lt;&lt; L\"DWM Service restarted successfully.\" &lt;&lt; std::endl;\n            }\n        }\n        else {\n            std::wcout &lt;&lt; L\"DWM Service is in state: \" \n                &lt;&lt; ssp.dwCurrentState &lt;&lt; std::endl;\n\n            SetLastError(ERROR_INTERNAL_ERROR);\n            FreeLibrary(hModuleDwm);\n            return FALSE;\n        }\n        \n        \/\/ #define DWM_EC_ENABLECOMPOSITION 1\n        if (pFuncEnableDwm(TRUE) == S_OK)\n        {\n            FreeLibrary(hModuleDwm);\n            return TRUE;\n        }\n        else {\n            SetLastError(ERROR_INTERNAL_ERROR);\n            FreeLibrary(hModuleDwm);\n            return FALSE;\n        }\n    }\n\n    return TRUE;\n}<\/code><\/pre>\n<p>\n   \u540e\u7eed\u4ecd\u9700\u8981\u7ee7\u7eed\u5b8c\u5584\u7a97\u53e3\u5408\u6210\u68c0\u6d4b\u7684\u90e8\u5206\uff0c\u76ee\u524d\u5df2\u7ecf\u53bb\u9664\u4e86\u5bf9 dwm.exe \u8fdb\u7a0b\u7684\u68c0\u6d4b\uff08\u8fd9\u4e00\u6b65\u662f\u591a\u4f59\u7684\uff09\u3002\n  <\/p>\n<h4 id=\"2.2.%20%E6%80%8E%E6%A0%B7%E5%90%AF%E7%94%A8%E6%A1%8C%E9%9D%A2%20WorkerW%20%E5%88%86%E7%BB%84%E5%B1%82%E6%AC%A1%EF%BC%9F\">\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     1.2. \u600e\u6837\u542f\u7528\u5de5\u4f5c\u533a\u7a97\u53e3(WorkerW)\uff1f<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n  <\/h4>\n<p style=\"text-align:justify\">\n   \u6211\u4eec Windows \u7cfb\u7edf\u5df2\u7ecf\u5f00\u542f DWM Composition \u4e86\uff0c\u90a3\u4e48\u6211\u4eec\u600e\u4e48\u624d\u80fd\u8ba9\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u5c42\u6b21\u53d1\u751f\u6539\u53d8\uff0c\u80fd\u591f\u8ba9\u6211\u4eec\u6b63\u5e38\u5d4c\u5165\u5462\uff1f\u4e0a\u6587\u8bf4\u8fc7\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u5fc5\u987b\u662f\u53cc<br \/>\n   <strong><br \/>\n    WorkerW<br \/>\n   <\/strong><br \/>\n   \u7684\u5c42\u6b21\uff0c\u800c\u4e14 Z \u5e8f\u662f\u56fa\u5b9a\u7684\uff1a\n  <\/p>\n<p style=\"text-align:center\">\n<p style=\"text-align:center\">\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     WorkerW 1 &gt; WorkerW 2 &gt; Progman<br \/>\n    <\/strong><br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u5982\u679c\u662f\u5d4c\u5165\u5230 WorkerW 2 \u7a97\u53e3\u4e0b\u9762\uff0c\u4f1a\u88ab WorkerW 2 \u6321\u4f4f\uff1b\u53cd\u4e4b\uff0c\u5982\u679c\u662f\u5d4c\u5165\u5230 WorkerW 2 \u7a97\u53e3\u4e0a\u9762\uff0c\u6211\u4eec\u5fc5\u786e\u4fdd WorkerW 2 \u7a97\u53e3\u662f Visible \u7684\uff0c\u5426\u5219\u5d4c\u5165\u7684\u7a97\u53e3\u4e5f\u662f\u4e0d\u53ef\u89c1\u7684\u3002WorkerW 2 \u7a97\u53e3\u521b\u5efa\u51fa\u6765\u540e\u5e76\u6ca1\u6709\u5728\u5176\u4e0a\u7ed8\u5236\u80cc\u666f\uff0c\u6240\u4ee5\u663e\u793a\u7684\u8fd8\u662f Progman \u7684\u80cc\u666f\u3002 \u4f46\u662f\u5728Win7\u00a0WorkerW 2 \u7a97\u53e3\u5e76\u4e0d\u662f\u900f\u660e\u7684\uff0c\u6240\u4ee5\u5982\u679c\u5d4c\u5165\u5230 Progman \u4e2d\uff0c\u5e76\u4e14 WorkerW 2 \u662f Visible \u7684\u8bdd\uff0c\u56e0\u4e3a Z \u5e8f\u7684\u539f\u56e0\u7a0b\u5e8f\u7a97\u53e3\u786e\u5b9e\u4f1a\u88ab\u6321\u4f4f\uff0c\u5e76\u4e14\u5728 Win 7\/ win 8\u4e0b WorkerW 1 \u4e5f\u662f\u4e0d\u900f\u660e\u7684\uff0c\u4e5f\u4f1a\u906e\u6321\uff0c\u800c Win 8.1 \u5219\u53ef\u4ee5\u5d4c\u5165\u5728 WorkerW 2 \u4e0a\u3002\n  <\/p>\n<p>\n   \u6839\u636e\u524d\u6587\u7814\u7a76\u7ed3\u8bba\uff1a\u5728\u91c7\u7528 WorkerW \u5206\u7ec4\u6761\u4ef6\u4e0b\uff0c\u4f4e\u7248\u672c\u7cfb\u7edf\u5d4c\u5165\u7a97\u53e3\u5fc5\u987b\u4ee5 Program \u4e3a\u7236\u7a97\u53e3\uff0c<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u5e76\u9690\u85cf WorkerW 2<br \/>\n   <\/span><br \/>\n   \uff0c\u5426\u5219\u65e0\u6cd5\u663e\u793a\u7a97\u53e3\uff1b\u800c\u5728\u9ad8\u7248\u672c\uff08\u4e0d\u4f4e\u4e8e Win 8.1\uff09\u7684\u684c\u9762\u5d4c\u5165\u7a97\u53e3\u5219\u5efa\u8bae\u4ee5 WorkerW 2 \u4e3a\u7236\u7a97\u53e3\u3002\n  <\/p>\n<h4 id=\"2.3%20%E4%B8%BA%E4%BB%80%E4%B9%88%E8%AF%B4%E9%AB%98%E7%89%88%E6%9C%AC%E5%BF%85%E9%A1%BB%E4%BB%A5WorkerW%202%E4%B8%BA%E7%88%B6%E7%AA%97%E5%8F%A3%E5%91%A2%EF%BC%9F\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.3 \u4e3a\u4ec0\u4e48\u8bf4\u9ad8\u7248\u672c\u5fc5\u987b\u4ee5 WorkerW 2 \u4e3a\u7236\u7a97\u53e3\u5462\uff1f<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   \u5728\u4e0d\u4f4e\u4e8e Win 8.1 \u4e0a\uff0c\u5982\u679c\u4ee5 Progman \u4f5c\u4e3a\u7236\u7a97\u53e3\u5d4c\u5165\u58c1\u7eb8\u7a97\u53e3\uff0c\u867d\u7136\u770b\u4f3c\u5d4c\u5165\u4e86\uff0c\u4f46\u662f\u5b58\u5728\u4e00\u4e9b\u96be\u4ee5\u89e3\u51b3\u7684\u95ee\u9898\u3002\u5176\u4e00\uff0c\u5f53\u663e\u793a\u684c\u9762\u65f6\uff0c\u5d4c\u5165\u7684\u7a97\u53e3\u53ef\u80fd\u88ab\u6700\u5c0f\u5316\u3002\u5176\u4e8c\uff0c\u5f53\u518d\u6b21\u53d1\u9001 0X052C \u6d88\u606f\u5230 Progman \u7a97\u53e3\u7684\u65f6\u5019\uff0c\u6211\u4eec\u7a97\u53e3\u7684\u6587\u672c\u4f1a\u88ab\u5f3a\u5236\u540c\u6b65\uff0c\u7531 RGB \u914d\u8272\u65b9\u6848\u8f6c\u4e3a ARGB\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5c06\u9ed1\u8272\u6587\u672c\u8bc6\u522b\u4e3a\u900f\u660e\u8272\uff0c\u5bfc\u81f4\u7a97\u53e3\u4e0a\u7684\u6807\u51c6\u6587\u672c\u63a7\u4ef6\u53d8\u5f97\u900f\u660e\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u7a97\u53e3\u7684\u6587\u672c\u63a7\u4ef6\u53d8\u4e3a\u900f\u660e\u8272\u4e86<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u4e0b\u9762\u662f\u53e6\u5916\u4e00\u6b3e\u8f6f\u4ef6\u51fa\u73b0\u7684\u989c\u8272\u9519\u8bef\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u684c\u9762\u4fbf\u7b7e\u6587\u5b57\u663e\u793a\u5f02\u5e38<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5173\u4e8e\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u662f\u5728\uff1a<br \/>\n   <a href=\"https:\/\/ask.csdn.net\/questions\/677023\" title=\"\u201c\u684c\u9762\u7a97\u53e3\u5d4c\u5165\u5e94\u7528\u9ed1\u8272\u50cf\u7d20\u53d8\u4e3a\u900f\u660e\u201d\"><br \/>\n    \u201c\u684c\u9762\u7a97\u53e3\u5d4c\u5165\u5e94\u7528\u9ed1\u8272\u50cf\u7d20\u53d8\u4e3a\u900f\u660e\u201d<br \/>\n   <\/a><br \/>\n   \u7684\u89e3\u7b54\u4e2d\u83b7\u77e5\u53ef\u80fd\u7684\u539f\u56e0\uff1a\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u8fd9\u662f\u56e0\u4e3a DWM \u8bbe\u7f6e\u4e86 ARGB \u578b\u7684\u900f\u660e\u8272\uff0c\u800c\u4f60\u7684\u7a0b\u5e8f\u4f7f\u7528\u7684\u662f\u4f20\u7edf\u7684 RGB \uff0c\u9ed1\u8272\u7684Alpha \u901a\u9053\u88ab\u8bef\u8ba4\u4e3a\u662f\u5b8c\u5168\u900f\u660e\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    \u8f85\u52a9\u8d44\u6599\uff1a\u4ee5\u4e0b\u5185\u5bb9\u6765\u6e90\u81ea\u7ffb\u8bd1\u6587\u7ae0\uff1a<br \/>\n    <a href=\"https:\/\/blog.csdn.net\/lassewang\/article\/details\/6873362\" title=\"\u300aDWM \u7a97\u4f53\u73bb\u7483\u6548\u679c\u5b9e\u73b0\u300b\"><br \/>\n     \u300aDWM \u7a97\u4f53\u73bb\u7483\u6548\u679c\u5b9e\u73b0\u300b<br \/>\n    <\/a><br \/>\n    \uff0c\u5f15\u7528\u81ea\u539f\u6587\u7ae0\uff1a<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/archive\/msdn-magazine\/2007\/april\/aero-glass-create-special-effects-with-the-desktop-window-manager\" rel=\"nofollow\" title=\"Aero Glass\uff1a\u4f7f\u7528\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\u521b\u5efa\u7279\u6b8a\u6548\u679c |Microsoft\u5b66\u4e60\"><br \/>\n     Aero Glass\uff1a\u4f7f\u7528\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\u521b\u5efa\u7279\u6b8a\u6548\u679c |Microsoft\u5b66\u4e60<br \/>\n    <\/a><br \/>\n    \u3002\n   <\/p>\n<\/blockquote>\n<p>\n   \u4e00\u4e2a\u7279\u6b8a\u95ee\u9898\u662f\u4f7f\u7528\u4f4d\u6a21\u5f0f<br \/>\n   <strong><br \/>\n    0x00000000<br \/>\n   <\/strong><br \/>\n   \u4ee5\u9ed1\u8272\u5448\u73b0<br \/>\n   <strong><br \/>\n    GDI<br \/>\n   <\/strong><br \/>\n   \u9879\u76ee\uff0c\u5728\u4f7f\u7528 Alpha \u7ba1\u9053\u65f6\u4e5f\u4f1a\u78b0\u5de7\u51fa\u73b0\u5b8c\u5168\u900f\u660e\u7684\u9ed1\u8272\u3002\u8fd9\u610f\u5473\u7740\u5982\u679c\u60a8\u4f7f\u7528\u9ed1\u8272<br \/>\n   <strong><br \/>\n    GDI<br \/>\n   <\/strong><br \/>\n   \u753b\u7b14\u6216\u7b14\u8fdb\u884c\u7ed8\u5236\uff0c\u5c06\u4f1a\u5f97\u5230\u900f\u660e\u7684\u989c\u8272\uff0c\u800c\u4e0d\u662f\u9ed1\u8272\u3002\u5f53\u60a8\u5c1d\u8bd5\u4f7f\u7528\u9ed8\u8ba4\u6587\u672c\u989c\u8272\u63a7\u5236\u4f4d\u4e8e\u73bb\u7483\u533a\u57df\u4e2d\u7684\u6587\u672c\u6807\u7b7e\u65f6\uff0c\u8fd9\u79cd\u95ee\u9898\u8868\u73b0\u5f97\u5c31\u7279\u522b\u660e\u663e\u3002\u56e0\u4e3a\u9ed8\u8ba4\u6587\u672c\u989c\u8272\u901a\u5e38\u4e3a\u9ed1\u8272\uff0c<br \/>\n   <strong><br \/>\n    DWM<br \/>\n   <\/strong><br \/>\n   \u4f1a\u8ba4\u4e3a\u5b83\u662f\u900f\u660e\u7684\uff0c\u56e0\u6b64\u6587\u672c\u5c06\u9519\u8bef\u5730\u5199\u5165\u73bb\u7483\u533a\u57df\u3002\u4e0b\u56fe\u663e\u793a\u4e86\u4e00\u4e2a\u8fd9\u6837\u7684\u793a\u4f8b\u3002\u7b2c\u4e00\u884c\u4f7f\u7528<br \/>\n   <strong><br \/>\n    GDI+<br \/>\n   <\/strong><br \/>\n   \u7f16\u5199\uff0c\u7b2c\u4e8c\u884c\u662f\u4e00\u4e2a\u4f7f\u7528\u9ed8\u8ba4\u989c\u8272\u7684\u6587\u672c\u6807\u7b7e\u63a7\u4ef6\u3002\u53ef\u4ee5\u770b\u51fa\uff0c\u5176\u4e2d\u7684\u5185\u5bb9\u51e0\u4e4e\u65e0\u6cd5\u8fa8\u8ba4\uff0c\u56e0\u4e3a\u5b83\u5b9e\u9645\u4e0a\u662f\u9519\u8bef\u5448\u73b0\u7684\u6587\u4ef6\uff0c\u6587\u672c\u663e\u793a\u4e3a\u7070\u8272\uff0c\u800c\u4e0d\u662f\u9ed1\u8272\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6587\u672c\u63a7\u4ef6\u7684\u900f\u660e\u5f02\u5e38<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u6b64\u56fe\u7247\u548c\u63cf\u8ff0\u6765\u81ea\uff1a<br \/>\n   <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/archive\/msdn-magazine\/2007\/april\/aero-glass-create-special-effects-with-the-desktop-window-manager\" rel=\"nofollow\" title=\"Aero Glass\uff1a\u4f7f\u7528\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\u521b\u5efa\u7279\u6b8a\u6548\u679c |Microsoft\u5b66\u4e60\"><br \/>\n    Aero Glass\uff1a\u4f7f\u7528\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\u521b\u5efa\u7279\u6b8a\u6548\u679c |Microsoft\u5b66\u4e60<br \/>\n   <\/a><br \/>\n   \u3002\n  <\/p>\n<p>\n   \uff08\u6b64\u5904\u7701\u7565\u539f\u6587\u63cf\u8ff0\u4e2d\u5df2\u7ecf\u8fc7\u65f6\u7684\u5185\u5bb9\uff09\n  <\/p>\n<hr\/>\n<blockquote>\n<p>\n    <strong><br \/>\n     <span style=\"color:#fe2c24\"><br \/>\n      2024.06.10 \u66f4\u65b0\u539f\u7406\u89e3\u91ca<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5d4c\u5165\u5728 Program \u4e0b\u65f6\uff0c\u4f1a\u5728\u7b2c\u4e8c\u6b21\u8c03\u7528 0x052C \u65f6\u89e6\u53d1\u63a7\u4ef6\u5e7b\u5f71\uff08\u7a7f\u900f\uff09\u7684\u7cfb\u7edf BUG\uff0c\u8fd9\u662f\u7531\u4e09\u4e2a\u95ee\u9898\u4e00\u8d77\u5bfc\u81f4\u7684\u7ed3\u679c\u3002\u56e0\u4e3a\u684c\u9762\u4f7f\u7528\u00a0WM_ERASEBKGND \u6d88\u606f\u5e76\u5904\u7406\u00a0RedrawWindow\u3001BeginPaint\u3001EndPaint \u7b49\u8fc7\u7a0b\u6765\u5c06\u5b9e\u73b0\u80cc\u666f\u548c\u56fe\u6807\u5c42\u7684\u56fe\u50cf\u7f13\u51b2\u533a\u7684\u5237\u65b0\u3002\u5f53 Program \u7a97\u53e3\u63a5\u6536\u5230 0x052C \u6d88\u606f\u65f6\u4f1a\u5c06\u5176\u5b50\u7a97\u53e3\u8e22\u51fa\u5230\u7b2c\u4e00\u4e2a WorkerW \u4e0b\uff08\u91cd\u65b0\u8bbe\u7f6e\u7236\u7a97\u53e3\uff09\uff0c\u65b0\u7684 Z \u5e8f\u6839\u636e\u8fdb\u5165\u987a\u5e8f\u4f1a\u5728 ListView(DefView) \u7a97\u53e3\u4e0a\u9762\uff0c\u5bfc\u81f4\u5d4c\u5165\u7684\u7a97\u53e3\u73b0\u5728\u5728\u5176\u7ed8\u5236\u533a\u5185\u8986\u76d6\u684c\u9762\u56fe\u6807\u7a97\u53e3\u7684\u7ed8\u5236\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u7236\u7a97\u53e3 WorkerW \u662f\u4f7f\u7528 DWM API \u7684\u6269\u5c55\u7a97\u53e3\uff0c\u5176\u989c\u8272\u65b9\u6848\u91c7\u7528 ARGB\uff0c\u6240\u4ee5\u5177\u6709\u9ed1\u8272 RBG \u80cc\u666f\u7684\u5b50\u7a97\u53e3\u4e0a\u7684\u63a7\u4ef6\u5c31\u4f1a\u88ab\u540c\u6b65\u4e3a\u900f\u660e\u8272\uff0c\u5bfc\u81f4\u6587\u672c\u63a7\u4ef6\u900f\u660e\u5f02\u5e38\u3002\u6700\u540e\uff0c\u7531\u4e8e\u7236\u7a97\u53e3\uff08\u53cc\u7f13\u51b2\uff09\u5e76\u4e0d\u80fd\u591f\u6b63\u786e\u5904\u7406\u8be5\u7a97\u53e3\u7684\u7ed8\u5236\uff0c\u6240\u4ee5\u62d6\u52a8\u7a97\u53e3\u65f6\u5176\u8fb9\u7f18\u4f1a\u51fa\u73b0\u91cd\u5f71\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u4e0b\u56fe\u663e\u793a\u4e86\u5728\u6240\u521b\u5efa\u7684 Win32 \u7a97\u53e3\u4e2d\u5d4c\u5165 Procexp \u7a97\u53e3\uff0c\u901a\u8fc7\u7c7b\u4f3c\u7684\u9014\u5f84\u6700\u7ec8\u4f7f\u5f97\u5b50\u7a97\u53e3\u7684\u6587\u672c\u63a7\u4ef6\u7a7f\u900f\u663e\u793a\u4e86\u6839\u7236\u7a97\u53e3\uff08\u8fd9\u91cc\u590d\u5236\u4e86\u684c\u9762\u80cc\u666f\u4f5c\u4e3a\u6f14\u793a\uff09\u3002\u6211\u4eec\u79f0\u4e4b\u4e3a\u7a97\u53e3\u5e7b\u5f71\u00a0BUG\uff1a<br \/>\n    <\/span>\n   <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n      ARGB \u8272\u6df7\u6dc6\u95ee\u9898\u590d\u73b0<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5b9e\u73b0\u4e00\u4e2a\u7a97\u53e3\uff0c\u5176 Z \u5e8f\u8986\u76d6\u5728\u684c\u9762\u56fe\u6807\u7a97\u53e3\u4e4b\u4e0a\uff0c\u5e76\u4e14\u5728\u5176\u7a97\u53e3\u56de\u8c03\u4e2d\u5904\u7406\u00a0WM_ERASEBKGND\uff0c\u5c06\u5bfc\u81f4\u684c\u9762\u58c1\u7eb8\u88ab\u663e\u793a\u51fa\u6765\uff1a<br \/>\n    <\/span>\n   <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n      \u5d4c\u5165\u7a97\u53e3\u5b9e\u73b0\u91cd\u53e0\u5b50\u7a97\u53e3<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5728\u8be5\u7a97\u53e3\u4e2d\u5d4c\u5165\u5b50\u7a97\u53e3\uff0c\u5f53\u62d6\u52a8\u5b50\u7a97\u53e3\u65f6\uff0c\u4ea7\u751f\u91cd\u5f71\uff08\u6ca1\u6709\u6b63\u786e\u5904\u7406\u7f13\u51b2\u533a\uff09\uff1a<br \/>\n    <\/span>\n   <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n      \u590d\u73b0\u62d6\u52a8\u7a97\u53e3\u65f6\u91cd\u5f71\u6b8b\u5f71\u95ee\u9898<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<\/blockquote>\n<p>\n   \u6d4b\u8bd5\u4ee3\u7801\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;iostream&gt;\n#include &lt;windows.h&gt;\n#include &lt;string&gt;\n#include &lt;dwmapi.h&gt;\n\n#pragma comment(lib, \"Dwmapi.lib\")\n\nconst static wchar_t* szClass = L\"WallpaerWindowClass\";\nconst static wchar_t* szTitle = L\"WallpaerWindow\";\n\n\/\/\u4e0e\u684c\u9762\u76f8\u5173\u7684\u7a97\u53e3\u53e5\u67c4\nHWND SysListView32 = nullptr;\nHWND SHELLDLL_DefView = nullptr;\nHWND WorkerW = nullptr;\nHWND Program = nullptr;\n\n\/\/\u62a5\u544a\u9519\u8bef\nvoid Error(const wchar_t* _error, const wchar_t* _from)\n{\n    std::wcout &lt;&lt; \"Error:\" &lt;&lt; _error &lt;&lt; \" From:\" &lt;&lt; _from &lt;&lt; std::endl;\n}\n\n\/\/EnumWindows\u7684\u56de\u8c03\u51fd\u6570\ninline BOOL CALLBACK EnumWindowsProc(_In_ HWND TopHandle, _In_ LPARAM topparamhandle)\n{\n    wchar_t str[256];\n    GetClassNameW(TopHandle, str, 256);\n    std::wstring s1 = str;\/\/\u68c0\u67e5\u7a97\u53e3\u662f\u5426\u53ebWorkerW\n    if (s1 == L\"WorkerW\")\n    {\n        \/\/\u68c0\u67e5\u662f\u5426\u6709\u5b50\u7a97\u53e3SHELLDLL_DefView\n        HWND def = FindWindowExW(TopHandle, nullptr, L\"SHELLDLL_DefView\", nullptr);\n        if (nullptr != def)\n        {\n            WorkerW = TopHandle;\n            SHELLDLL_DefView = def;\n        }\n        else\n        {\n            ShowWindow(TopHandle, SW_HIDE);\n        }\n\n    }\n\n    return true;\n}\n\n\n\/\/\u8bbe\u7f6e\u684c\u9762\u7684\u73af\u5883\n\/\/\u83b7\u53d6\u6240\u6709\u76f8\u5173\u7684\u53e5\u67c4\nbool SetDeskEnvironment()\n{\n    const wchar_t ErrorF[] = L\"SetDeskEnvironment\";\n\n    \/\/\u83b7\u53d6Program\u53e5\u67c4\n    Program = FindWindowW(L\"Progman\", L\"Program Manager\");\n    if (nullptr == Program) {\n        Error(L\"Can't Get Program Hwnd\", ErrorF);\n        return false;\n    }\n\n    \/\/\u53d1\u9001\u4fe1\u606f\uff0c\u8ba9Windows\u751f\u6210Worker\n    SendMessageTimeoutW(Program, 0x052c, 0, 1, SMTO_NORMAL, 0x3e8, nullptr);\n    Sleep(100);\n    SendMessageTimeoutW(Program, 0x052c, 0, 0, SMTO_NORMAL, 0x3e8, nullptr);\n\n    EnumWindows(EnumWindowsProc, (LPARAM)nullptr);\n\n    \/\/\u83b7\u53d6SysListView32\u53e5\u67c4\n    SysListView32 = FindWindowExW(SHELLDLL_DefView, nullptr, L\"SysListView32\", L\"FolderView\");\n    if (nullptr == SysListView32) {\n        Error(L\"Can't Get SysListView32 Hwnd\", ErrorF);\n        return false;\n    }\n\n    return true;\n}\n\n\nvoid printtptext(HWND hwnd, int x, int y, int cHeight, int cWidth, LPCWSTR lpString, COLORREF color, LPCWSTR pszFaceName)\n{\n    HDC hdc = GetDC(hwnd);\/\/\u83b7\u53d6\u8bbe\u5907\u4e0a\u4e0b\u6587\u7684\u53e5\u67c4 \n    SetBkMode(hdc, TRANSPARENT);\n    SetTextColor(hdc, color);\n    HFONT font = CreateFontW(cHeight, cWidth, 0, 0, FW_NORMAL, FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, pszFaceName);\n    SelectObject(hdc, font);\n    TextOutW(hdc, x, y, lpString, wcslen(lpString));\n}\n\n\/\/ \u5728\u7a97\u53e3\u521b\u5efa\u540e\u8c03\u7528\uff1a\u7981\u7528\u5149\u6805\u5316\nvoid DisableDWMShadow(HWND hWnd)\n{\n    DWM_BLURBEHIND bb = { 0 };\n    bb.dwFlags = DWM_BB_ENABLE;\n    bb.fEnable = FALSE;\n\n    DwmEnableBlurBehindWindow(hWnd, &amp;bb);\n}\n\nvoid ExtendDWMFrame(HWND hWnd)\n{\n    MARGINS margins = { -1 };\n\n    DwmExtendFrameIntoClientArea(hWnd, &amp;margins);\n}\n\nHWND hws = NULL;\n\/\/\u8bbe\u7f6e\u7a97\u53e3\u4e3a\u684c\u9762\u80cc\u666f\nbool SetWallWindow(LPCWSTR ClassName, LPCWSTR TitleName)\n{\n    const wchar_t ErrorF[] = L\"SetWallWindow\";\n\n    \/\/\u5bfb\u627e\u8981\u690d\u5165\u684c\u9762\u7684\u7a97\u53e3\u7684\u53e5\u67c4\n    HWND hWall = FindWindowW(ClassName, TitleName);\n    if (nullptr == hWall) {\n        Error(L\"Can't Get hWall Hwnd\", ErrorF);\n        return false;\n    }\n\n\n    if (nullptr == Program) {\n        Error(L\"Not get Program Hwnd\", ErrorF);\n        return false;\n    }\n\n    \/\/\u628a\u7a97\u53e3\u8bbe\u7acb\u4e3aProgman\u7684\u5b50\u7a97\u53e3\n    \n    \/\/LONG_PTR dwStyle = NULL;\n    \/\/dwStyle = GetWindowLongPtrW(hWall, GWL_EXSTYLE);\n    \/\/dwStyle |= WS_EX_LAYERED;\n    \/\/SetWindowLongPtrW(hWall, GWL_EXSTYLE, dwStyle);\n    \/\/\n    \/\/DisableDWMShadow(hWall);\n    \/\/DisableDWMShadow(SHELLDLL_DefView);\n    \/\/ExtendDWMFrame(hWall);\n    \n    \/\/SetWindowLongW(hWall, GWL_STYLE, GetWindowLong(SHELLDLL_DefView, GWL_STYLE) | WS_CAPTION);\n    \/\/ShowWindow(SysListView32, SW_HIDE);\n    \/\/SetWindowLongW(WorkerW, GWL_STYLE, GetWindowLongW(WorkerW, GWL_STYLE) &amp;~WS_CLIPSIBLINGS &amp;~WS_CLIPCHILDREN);\n\n    \/\/ \u8fd9\u91cc\u9700\u8981\u4fee\u6539\u4e3a\u4f60\u9700\u8981\u6d4b\u8bd5\u7684\u7a97\u53e3\u53e5\u67c4\n    HWND hPro = SetParent(hWall, WorkerW);\n    hws = FindWindowW(L\"Notepad\", nullptr);\n    SetParent(hws, hWall);\n    ShowWindow(hws, SW_SHOW);\n    \n    if (nullptr == hPro) {\n        Error(L\"Set Parent Failed\", ErrorF);\n        return false;\n    }\n\n    return true;\n}\n\n\n\nLRESULT CALLBACK __WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)\n{\n    PAINTSTRUCT ps;\n    HDC hdc;\n    switch (msg) {\n    case WM_DESTROY:\n        PostQuitMessage(0);\n        break;\n    case WM_PAINT:\n    {\n        hdc = BeginPaint(hWnd, &amp;ps);\n        \n        EndPaint(hWnd, &amp;ps); \/\/\u7ed3\u675f\u7f13\u5236\n    }\n        break;\n    case WM_WINDOWPOSCHANGING:\n    {\n        UpdateWindow(SysListView32);\n    }\n    \/\/case WM_WINDOWPOSCHANGED:\n    \/\/{\n        \/\/UpdateWindow(SysListView32);\n        \/\/ \u5f3a\u5236 SHELLDLL_DefView \u91cd\u7ed8\u6574\u4e2a\u533a\u57df\n        \/\/RedrawWindow(WorkerW, nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN);\n    \/\/}\n    case WM_ERASEBKGND:\n    {\n        HDC hdc = reinterpret_cast&lt;HDC&gt;(wParam);\n\n        \/\/ \u83b7\u53d6\u7a97\u53e3\u5ba2\u6237\u533a\u57df\u7684\u77e9\u5f62\n        RECT clientRect;\n        GetClientRect(hWnd, &amp;clientRect);\n\n        \/\/ \u8bbe\u7f6e\u80cc\u666f\u900f\u660e\u6a21\u5f0f\n        SetBkMode(hdc, TRANSPARENT);\n\n        \/\/ \u4f7f\u7528 ExtTextOut \u51fd\u6570\u7ed8\u5236\u900f\u660e\u6587\u672c\uff08\u5b9e\u9645\u4e0a\u4e0d\u7ed8\u5236\u6587\u672c\uff0c\u4f46\u4f1a\u586b\u5145\u900f\u660e\u80cc\u666f\uff09\n        ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &amp;clientRect, nullptr, 0, nullptr);\n\n        \/\/ \u8fd4\u56de\u975e\u96f6\u503c\u8868\u793a\u5df2\u7ecf\u5904\u7406\u4e86 WM_ERASEBKGND \u6d88\u606f\n        return TRUE;\n    }\n    }\n    return DefWindowProcW(hWnd, msg, wParam, lParam);\n}\n\n\n\nDWORD mainWindowThread(void* argv)\n{\n    HINSTANCE hIns = ::GetModuleHandle(0);\n    WNDCLASSEXW wc{};\n    wc.cbSize = sizeof(wc);\n    wc.style = CS_HREDRAW | CS_VREDRAW;\n    wc.cbClsExtra = 0;\n    wc.cbWndExtra = 0;\n    wc.hInstance = hIns;\n    wc.hIcon = LoadIcon(0, IDI_APPLICATION);\n    wc.hIconSm = 0;\n    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);\n    wc.hCursor = LoadCursor(0, IDC_ARROW);\n    wc.lpfnWndProc = __WndProc;\n    wc.lpszMenuName = NULL;\n    wc.lpszClassName = szClass;\n\n    if (!RegisterClassExW(&amp;wc)) exit(0);\n\n    DWORD style = WS_OVERLAPPEDWINDOW;\n    DWORD styleEx = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;\n\n    \/\/\u8ba1\u7b97\u5ba2\u6237\u533a\u57df\u4e3a\u5bbd800,\u9ad8600\u7684\u7a97\u53e3\u5c3a\u5bf8\n    int scWidth = GetSystemMetrics(SM_CXSCREEN);\n    int scHeight = GetSystemMetrics(SM_CYSCREEN);\n    RECT rect = { 0, 0, scWidth, scHeight };\n    AdjustWindowRectEx(&amp;rect, style, false, styleEx);\n\n    HWND hWnd = CreateWindowExW(styleEx, szClass, szTitle, style, 0, 0,\n        rect.right - rect.left, rect.bottom - rect.top, 0, 0, hIns, 0);\n\n    if (hWnd == 0) exit(0);\n\n    UpdateWindow(hWnd);\n    ShowWindow(hWnd, SW_SHOW);\n    MARGINS margins = { 0, 0, 1, 0 }; \/\/ Adjust the values as needed\n\n    DwmExtendFrameIntoClientArea(hWnd, &amp;margins);\n    \n\n    MSG msg = { 0 };\n    while (msg.message != WM_QUIT) {\n        if (PeekMessageW(&amp;msg, 0, 0, 0, PM_REMOVE)) {\n            TranslateMessage(&amp;msg);\n            DispatchMessageW(&amp;msg);\n        }\n    }\n    return 0;\n}\n\n\n\nint main()\n{\n    std::cout &lt;&lt; \"Program Start!\" &lt;&lt; std::endl;\n    HANDLE hThread = CreateThread(NULL, 0,\n        (LPTHREAD_START_ROUTINE)mainWindowThread, NULL, 0, NULL);\n\n    SetDeskEnvironment();\n\n    SetWallWindow(szClass, szTitle);\n\n    std::cout &lt;&lt; \"Press any key...\" &lt;&lt; std::endl;\n    getchar();\n    ShowWindow(SysListView32, SW_SHOW);\n    return 0;\n}<\/code><\/pre>\n<blockquote>\n<p>\n    \u5176\u4e2d\uff1a\n   <\/p>\n<p>\n    <span style=\"color:#fe2c24\"><br \/>\n     \/\/ \u8fd9\u91cc\u9700\u8981\u4fee\u6539\u4e3a\u4f60\u9700\u8981\u6d4b\u8bd5\u7684\u7a97\u53e3\u53e5\u67c4<br \/>\n     <br \/>\n     HWND hPro = SetParent(hWall, WorkerW);<br \/>\n     <br \/>\n     hws = FindWindowW(L&#8221;Notepad&#8221;, nullptr);\u00a0 \/\/ \u8981\u5d4c\u5165\u7684\u5b50\u7a97\u53e3<br \/>\n     <br \/>\n     SetParent(hws, hWall);<br \/>\n     <br \/>\n     ShowWindow(hws, SW_SHOW);<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u6240\u4ee5\uff0c\u591a\u4e00\u4e8b\u4e0d\u5982\u5c11\u4e00\u4e8b\uff0c<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u9ad8\u7248\u672c\u7cfb\u7edf<br \/>\n   <\/span><br \/>\n   \u5d4c\u5165\u5728 WorkerW 2 \u4e0b\u53ef\u4ee5\u7701\u53bb\u4e0d\u5fc5\u8981\u7684\u9ebb\u70e6\u3002\n  <\/p>\n<h4 id=\"2.4%20%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%BF%99%E4%BA%9B%E7%AA%97%E5%8F%A3%E7%9A%84%E5%8F%A5%E6%9F%84%EF%BC%9F\">\n   <span style=\"color:#0d0016\"><br \/>\n    1.4 \u5982\u4f55\u83b7\u53d6\u8fd9\u4e9b\u7a97\u53e3\u7684\u53e5\u67c4\uff1f<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   \u524d\u9762\u5206\u6790\u8fc7\uff0c\u8981\u60f3\u8ba9\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u53d8\u6210\u9002\u5408\u5d4c\u5165\u7684\u900f\u660e\u5c42\u6b21\uff0c\u6211\u4eec\u9700\u8981\u5411 Progman \u7a97\u53e3\u53d1\u9001\u4e00\u4e2a 0x052C \u7684\u6d88\u606f\uff0c\u8fd9\u4e2a\u662f Windows \u7cfb\u7edf\u4fdd\u7559\u7684\u4e00\u4e2a\u6d88\u606f\uff0c\u5b83\u5728 Win 7 \u4e4b\u540e\u7248\u672c\u624d\u6709\u6548\uff08<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    Vista SP1 \u6ca1\u6709\u54cd\u5e94\u8fd9\u4e2a\u6d88\u606f<br \/>\n   <\/span><br \/>\n   \uff09\u3002\u5f53\u53d1\u9001\u8fd9\u4e2a\u6d88\u606f\u540e\uff0cexplorer.exe \u5c31\u4f1a\u751f\u6210 WorkerW \u7a97\u53e3\uff08\u4e0a\u6587\u6240\u8bf4 WorkerWs \uff09\uff0cProgman \u4e0a\u7684 SHELLDLL_DefView \u4ee5\u53ca\u56fe\u6807 SysListView32 \u7a97\u53e3\u90fd\u4f1a\u6210\u4e3a WorkerW 1 \u7684\u5b50\u7a97\u53e3\uff0c\u540c\u65f6\u8fd8\u4f1a\u4ea7\u751f\u53e6\u5916\u4e00\u4e2a WorkerW \u7a97\u53e3\uff08\u4e0a\u6587\u6240\u8bf4 WorkerW 2\uff09\u3002\u5224\u65ad\u5f53\u524d\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u662f\u4e0d\u662f\u900f\u660e\u5c42\u6b21\uff0c \u53ef\u4ee5\u7528 FindWindowEx \u67e5\u627e\u5230WorkerW 2\uff0c\u81f3\u4e8eWorkerW 1 \u53ef\u4ee5 EnumWindows \u679a\u4e3e\u6765\u67e5\u627e\uff0c\u4e5f\u53ef\u4ee5 FindWindowEx \u5faa\u73af\u67e5\u627e\u3002\u5982\u679c\u4e24\u4e2a\u90fd\u627e\u5230\u90a3\u5c31\u53ef\u4ee5\u76f4\u63a5\u5d4c\u5165\uff0c\u5426\u5219\u9700\u8981\u53d1 0x052C \u6d88\u606f\u5230 Progman \u7a97\u53e3\uff0c\u6765\u542f\u7528 WorkerW \u5206\u7ec4\u3002\n  <\/p>\n<p>\n   \u8fd9\u91cc\uff0c\u6211\u4eec\u4f7f\u7528 EnumWindows \u51fd\u6570\u679a\u4e3e\u76f8\u5173\u7a97\u53e3\u53e5\u67c4\uff0c\u5e76\u5728 EnumWindowsProc \u56de\u8c03\u51fd\u6570\u91cc\u9762\u5c06\u7a97\u53e3\u53e5\u67c4\u538b\u5165\u7ed3\u6784\u4f53\u6210\u5458\u53d8\u91cf\u3002\n  <\/p>\n<p>\n   EnumWindows \u51fd\u6570\u901a\u8fc7\u5c06\u6bcf\u4e2a\u7a97\u53e3\u7684\u53e5\u67c4\u4f9d\u6b21\u4f20\u9012\u7ed9\u5e94\u7528\u7a0b\u5e8f\u5b9a\u4e49\u7684\u56de\u8c03\u51fd\u6570\u6765\u679a\u4e3e\u5c4f\u5e55\u4e0a\u7684\u6240\u6709\u9876\u7ea7\u7a97\u53e3\u3002<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     \u679a\u4e3e Windows<br \/>\n    <\/strong><br \/>\n    \u5c06\u4e00\u76f4\u6301\u7eed\u5230\u6700\u540e\u4e00\u4e2a\u9876\u7ea7\u7a97\u53e3\u6216\u56de\u8c03\u51fd\u6570\u8fd4\u56de<br \/>\n    <strong><br \/>\n     FALSE<br \/>\n    <\/strong><br \/>\n    \u3002<br \/>\n   <\/span>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      BOOL<br \/>\n     <\/strong><br \/>\n     EnumWindows(<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      WNDENUMPROC<br \/>\n     <\/strong><br \/>\n     lpEnumFunc,<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      LPARAM<br \/>\n     <\/strong><br \/>\n     lParam<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     );<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u53c2\u6570\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in] lpEnumFunc\uff1a\u6307\u5411\u5e94\u7528\u7a0b\u5e8f\u5b9a\u4e49\u7684\u56de\u8c03\u51fd\u6570\u7684\u6307\u9488\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in] lParam\uff1a\u8981\u4f20\u9012\u7ed9\u56de\u8c03\u51fd\u6570\u7684\u5e94\u7528\u7a0b\u5e8f\u5b9a\u4e49\u503c\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u8fd4\u56de\u503c\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      BOOL<br \/>\n     <\/strong><br \/>\n     dwErrorReturn<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5982\u679c\u8be5\u51fd\u6570\u6210\u529f\uff0c\u5219\u8fd4\u56de\u503c\u4e3a\u975e\u96f6\u503c\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5982\u679c\u51fd\u6570\u5931\u8d25\uff0c\u5219\u8fd4\u56de\u503c\u4e3a\u96f6\u3002 \u8981\u83b7\u5f97\u66f4\u591a\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u8bf7\u8c03\u7528 GetLastError\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u5982\u679c<br \/>\n     <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/previous-versions\/windows\/desktop\/legacy\/ms633498%28v=vs.85%29\" rel=\"nofollow\" title=\"EnumWindowsProc\"><br \/>\n      EnumWindowsProc<br \/>\n     <\/a><br \/>\n     \u8fd4\u56de\u96f6\uff0c\u5219\u8fd4\u56de\u503c\u4e5f\u4e3a\u96f6\u3002 \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u56de\u8c03\u51fd\u6570\u5e94\u8c03\u7528<br \/>\n     <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/errhandlingapi\/nf-errhandlingapi-setlasterror\" rel=\"nofollow\" title=\"SetLastError\"><br \/>\n      SetLastError<br \/>\n     <\/a><br \/>\n     \u4ee5\u83b7\u53d6\u8981\u8fd4\u56de\u7ed9<br \/>\n     <strong><br \/>\n      EnumWindows<br \/>\n     <\/strong><br \/>\n     \u8c03\u7528\u65b9\u6709\u610f\u4e49\u7684\u9519\u8bef\u4ee3\u7801\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u6839\u636e\u4e0a\u6587\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u5c42\u6b21\u7684\u7406\u8bba\u5206\u6790\uff0c\u56de\u8c03\u51fd\u6570\u5e94\u8be5\u8fd9\u6837\u5199\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">\u200b\ninline BOOL CALLBACK EnumWindowsProc(HWND handle, LPARAM lparam)\n{\n    if ((void*)lparam == nullptr)\n        return FALSE;\n    auto WndInfo = (DesktopWndInfoPtr)lparam;\n    DWORD_PTR result = 0;\n    \/\/ \u83b7\u53d6\u7b2c\u4e00\u4e2aWorkerW\u7a97\u53e3\uff08\u5f02\u5e38\u65f6\u83b7\u53d6\u5230\u7684\u662f Progman \u7a97\u53e3\uff09\n    HWND DefView = FindWindowExW(handle, 0, L\"SHELLDLL_DefView\", NULL);\n\n    if (DefView != NULL)\/\/ \u627e\u5230\u7b2c\u4e00\u4e2aWorkerW\u7a97\u53e3\n    {\n        (*WndInfo).Workerw1 = handle;\n        (*WndInfo).ShellDefView = DefView;\n        \/\/ \u83b7\u53d6\u7b2c\u4e8c\u4e2aWorkerW\u7a97\u53e3\u7684\u7a97\u53e3\u53e5\u67c4\n        (*WndInfo).Workerw2 = FindWindowExW(0, handle, L\"WorkerW\", 0);\n        \n        SetLastError(0);  \/\/ \u786e\u4fdd\u4e0d\u4f1a\u8bef\u8bca\uff01\uff01\uff01\u8981\u4e48\u5c31\u4e0d\u7acb\u5373\u8fd4\u56de\u3002\n        return FALSE;  \/\/ Patch\uff1a\u6839\u636e MSDN \u8bf4\u660e\uff0c\u5e94\u8be5\u7acb\u5373\u8fd4\u56de FALSE \u4ee5\u4fbf\u4e8e\u7ed3\u675f\u679a\u4e3e\u3002\n        \/\/ \u82e5\u8981\u7ee7\u7eed\u679a\u4e3e\uff0c\u56de\u8c03\u51fd\u6570\u5fc5\u987b\u8fd4\u56de TRUE;\u82e5\u8981\u505c\u6b62\u679a\u4e3e\uff0c\u5b83\u5fc5\u987b\u8fd4\u56de FALSE\u3002\n        \/\/ https:\/\/learn.microsoft.com\/zh-cn\/previous-versions\/windows\/desktop\/legacy\/ms633498(v=vs.85)\n        \n    } \/\/ Patch\uff1a\u5728 EnumWindowsProc \u56de\u8c03\u51fd\u6570\u4e2d\u4f7f\u7528 SMTO \u6d88\u606f\u53d1\u9001\u53ef\u80fd\u964d\u4f4e\u8ba1\u7b97\u673a\u6027\u80fd\n      \/\/ \u5e76\u4e14\u53ef\u80fd\u56e0\u4e3a\u8d85\u65f6\u800c\u5bfc\u81f4\u7a97\u53e3\u904d\u5386\u5931\u8d25\uff08\u540e\u9762\u4ee3\u7801\u5bf9\u8bbe\u7f6e\u7a97\u53e3\u7684\u7ebf\u7a0b\u9650\u5236\u4e86\u6267\u884c\u65f6\u95f4\uff0c\u8d85\u65f6\u5219\u505c\u6b62\u8fd0\u884c\uff09\n\/\/    else {\/\/ \u5982\u679c\u4e0d\u80fd\u627e\u5230\u7b2c\u4e00\u4e2aWorkerW, \u5219\u91cd\u65b0\u53d1\u9001\u6d88\u606f\n\/\/        HWND hProgman = (*WndInfo).Progman;\n\/\/        SendMessageTimeoutW(hProgman, 0x052C, 0, 0, SMTO_NORMAL, 0x03E8, &amp;result);\n\/\/    }\n    return TRUE;\n}<\/code><\/pre>\n<p>\n   \u5176\u4e2d\uff0cDesktopWndInfo \u662f\u6211\u81ea\u5df1\u5b9a\u4e49\u7684\u7ed3\u6784\u4f53\uff0c\u7528\u4e8e\u5168\u5c40\u8bb0\u5f55\u7a97\u53e3\u4fe1\u606f\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">typedef struct _DesktopWndInfo\n{\n    int  OSVersion = 1;               \/\/ \u64cd\u4f5c\u7cfb\u7edf\u5206\u7c7b\u53f7\n    bool IsCreatedWindow = false;     \/\/ \u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u662f\u5426\u521b\u5efa\u5b8c\u6210\n    HWND WallpaperWnd = NULL;         \/\/ \u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u4e3b\u7a97\u53e3\u53e5\u67c4\n    HWND Workerw1 = NULL;             \/\/ \u7b2c\u4e00\u4e2aWorkerW\u7a97\u53e3\u53e5\u67c4\n    HWND Workerw2 = NULL;             \/\/ \u7b2c\u4e8c\u4e2aWorkerW\u7a97\u53e3\u53e5\u67c4\n    HWND ShellDefView = NULL;         \/\/ ShellDefView\u7a97\u53e3\u53e5\u67c4\n    HWND Progman = NULL;              \/\/ \u603b\u7a97\u53e3\u53e5\u67c4\n}DesktopWndInfo, * DesktopWndInfoPtr;<\/code><\/pre>\n<p>\n   \u4e3a\u4e86\u89e3\u51b3 24H2 \u53ea\u6709\u4e00\u4e2a WorkerW \u7279\u5f81\u7684\u95ee\u9898\uff0c\u6211\u8ba4\u4e3a\u53ef\u4ee5\u4e0d\u518d\u4f7f\u7528\u904d\u5386\u7a97\u53e3\u7684\u65b9\u6cd5\u83b7\u53d6\u6240\u9700\u7a97\u53e3\u7ed3\u6784\u4fe1\u606f\uff0c\u800c\u53ef\u4ee5\u5339\u914d\u5df2\u77e5\u7684\u7a97\u53e3\u7ed3\u6784\u5c42\u6b21\u6765\u83b7\u53d6\u7a97\u53e3\u3002\u521d\u6b65\u7f16\u5199\u7684\u641c\u7d22\u7b97\u6cd5\u5982\u4e0b\uff1a\n  <\/p>\n<ul>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       \u67e5\u627e &#8220;Progman&#8221; \u7a97\u53e3<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span>\n    <\/p>\n<ul>\n<li>\n      \u901a\u8fc7<br \/>\n      <code><br \/>\n       FindWindowW<br \/>\n      <\/code><br \/>\n      \u67e5\u627e\u7c7b\u540d\u4e3a &#8220;Progman&#8221; \u7684\u7a97\u53e3\u53e5\u67c4\u3002\n     <\/li>\n<li>\n      \u5982\u679c\u627e\u4e0d\u5230\u6216\u53e5\u67c4\u65e0\u6548\uff0c\u8fd4\u56de\u9519\u8bef\u4fe1\u606f\u5e76\u7ec8\u6b62\u51fd\u6570\u3002\n     <\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       \u83b7\u53d6\u524d\u4e00\u4e2a\u7a97\u53e3<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span>\n    <\/p>\n<ul>\n<li>\n      \u4f7f\u7528<br \/>\n      <code><br \/>\n       GetWindow<br \/>\n      <\/code><br \/>\n      \u83b7\u53d6<br \/>\n      <code><br \/>\n       Progman<br \/>\n      <\/code><br \/>\n      \u7a97\u53e3\u7684\u524d\u4e00\u4e2a\u7a97\u53e3\u53e5\u67c4\u3002\n     <\/li>\n<li>\n      \u5982\u679c\u627e\u4e0d\u5230\u524d\u4e00\u4e2a\u7a97\u53e3\uff0c\u8fd4\u56de\u9519\u8bef\u4fe1\u606f\u5e76\u7ec8\u6b62\u51fd\u6570\u3002\n     <\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\n     <span style=\"color:#0d0016\"><br \/>\n      <strong><br \/>\n       \u6839\u636e\u524d\u4e00\u4e2a\u7a97\u53e3\u7684\u7c7b\u540d\u51b3\u5b9a\u5904\u7406\u903b\u8f91<br \/>\n      <\/strong><br \/>\n      \uff1a<br \/>\n     <\/span>\n    <\/p>\n<ul>\n<li>\n      \u83b7\u53d6\u524d\u4e00\u4e2a\u7a97\u53e3\u7684\u7c7b\u540d\u3002\n     <\/li>\n<li>\n      \u5982\u679c\u7c7b\u540d\u4e0d\u662f &#8220;WorkerW&#8221;\uff0c\u5219\u5728<br \/>\n      <code><br \/>\n       Progman<br \/>\n      <\/code><br \/>\n      \u7a97\u53e3\u7684\u5b50\u7a97\u53e3\u4e2d\u67e5\u627e\u7c7b\u540d\u4e3a &#8220;SHELLDLL_DefView&#8221; \u7684\u7a97\u53e3\u3002<\/p>\n<ul>\n<li>\n        \u5982\u679c\u627e\u5230 &#8220;SHELLDLL_DefView&#8221;\uff0c\u5219\u4ece\u5b50\u7a97\u53e3\u4e2d\u67e5\u627e &#8220;WorkerW&#8221; \u7a97\u53e3\uff0c\u4fdd\u5b58\u5230<br \/>\n        <code><br \/>\n         DesktopWndInfo<br \/>\n        <\/code><br \/>\n        \u7ed3\u6784\u4f53\u4e2d\u3002\n       <\/li>\n<li>\n        \u5982\u679c\u627e\u4e0d\u5230 &#8220;SHELLDLL_DefView&#8221; \u6216 &#8220;WorkerW&#8221;\uff0c\u8fd4\u56de\u9519\u8bef\u4fe1\u606f\u5e76\u7ec8\u6b62\u51fd\u6570\u3002\n       <\/li>\n<\/ul>\n<\/li>\n<li>\n      \u5982\u679c\u7c7b\u540d\u662f &#8220;WorkerW&#8221;\uff0c\u5219\u8fdb\u4e00\u6b65\u68c0\u67e5<br \/>\n      <code><br \/>\n       WorkerW<br \/>\n      <\/code><br \/>\n      \u7a97\u53e3\u7684\u5b50\u7a97\u53e3\u4e2d\u662f\u5426\u6709 &#8220;SHELLDLL_DefView&#8221;\u3002<\/p>\n<ul>\n<li>\n        \u5982\u679c\u627e\u5230 &#8220;SHELLDLL_DefView&#8221;\uff0c\u4fdd\u5b58\u5230<br \/>\n        <code><br \/>\n         DesktopWndInfo<br \/>\n        <\/code><br \/>\n        \u7ed3\u6784\u4f53\u4e2d\u3002\n       <\/li>\n<li>\n        \u5982\u679c\u627e\u4e0d\u5230 &#8220;SHELLDLL_DefView&#8221;\uff0c\u7ee7\u7eed\u67e5\u627e\u524d\u4e00\u4e2a<br \/>\n        <code><br \/>\n         WorkerW<br \/>\n        <\/code><br \/>\n        \u7a97\u53e3\uff0c\u5e76\u67e5\u627e\u5176\u5b50\u7a97\u53e3\u4e2d\u7684 &#8220;SHELLDLL_DefView&#8221;\u3002\n       <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\n   \u4ee3\u7801\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">BOOL OnInitFindDesktopWindows(DesktopWndInfoPtr lpWndInfo) {\n    HWND hProgmanWnd = FindWindowW(L\"Progman\", nullptr);\n\n    \/\/ \u9519\u8bef\u5904\u7406\uff1a\u627e\u4e0d\u5230 \"Progman\" \u7a97\u53e3\n    if (!hProgmanWnd || GetLastError() == ERROR_INVALID_WINDOW_HANDLE) {\n        std::cerr &lt;&lt; \"[-] Fatal Error: No found Desktop Manager Window.\\n\";\n        return FALSE;\n    }\n    lpWndInfo-&gt;Progman = hProgmanWnd;\n\n    HWND hProgPrevWnd = GetWindow(hProgmanWnd, GW_HWNDPREV);\n    \/\/ \u9519\u8bef\u5904\u7406\uff1a\u627e\u4e0d\u5230\u524d\u4e00\u4e2a\u7a97\u53e3\n    if (!hProgPrevWnd) {\n        std::cerr &lt;&lt; \"[-] Fatal Error: No found Desktop Manager Window.\\n\";\n        return FALSE;\n    }\n\n    WCHAR wsTitle[50];\n    GetClassNameW(hProgPrevWnd, wsTitle, 50);\n    std::wstring strTitle = wsTitle;\n\n    if (strTitle != L\"WorkerW\") {\n        return FindShellDefViewInProgman(lpWndInfo, hProgmanWnd);\n    } else {\n        return FindShellDefViewInWorkerW(lpWndInfo, hProgPrevWnd);\n    }\n}\n\nBOOL FindShellDefViewInProgman(DesktopWndInfoPtr lpWndInfo, HWND hProgmanWnd) {\n    HWND hProgChildShellWnd = FindWindowExW(hProgmanWnd, nullptr, L\"SHELLDLL_DefView\", L\"\");\n    if (!hProgChildShellWnd) {\n        std::cerr &lt;&lt; \"[-] Error: No SHELLDLL_DefView found in Progman.\\n\";\n        return FALSE;\n    }\n\n    HWND hProgChildWorkerW = FindWindowExW(hProgmanWnd, nullptr, L\"WorkerW\", L\"\");\n    if (!hProgChildWorkerW) {\n        std::cerr &lt;&lt; \"[-] Error: No WorkerW found in Progman.\\n\";\n        return FALSE;\n    }\n\n    lpWndInfo-&gt;Workerw1 = hProgChildWorkerW;\n    lpWndInfo-&gt;ShellDefView = hProgChildShellWnd;\n    return TRUE;\n}\n\nBOOL FindShellDefViewInWorkerW(DesktopWndInfoPtr lpWndInfo, HWND hWorkerWnd) {\n    HWND hWorkerChildWnd = FindWindowExW(hWorkerWnd, nullptr, L\"SHELLDLL_DefView\", L\"\");\n    if (hWorkerChildWnd) {\n        lpWndInfo-&gt;Workerw1 = hWorkerWnd;\n        lpWndInfo-&gt;ShellDefView = hWorkerChildWnd;\n        return TRUE;\n    }\n\n    HWND hWorkerPrevWnd = GetWindow(hWorkerWnd, GW_HWNDPREV);\n    if (!hWorkerPrevWnd) {\n        std::cerr &lt;&lt; \"[-] Error: No previous WorkerW found.\\n\";\n        return FALSE;\n    }\n\n    hWorkerChildWnd = FindWindowExW(hWorkerPrevWnd, nullptr, L\"SHELLDLL_DefView\", L\"\");\n    if (!hWorkerChildWnd) {\n        std::cerr &lt;&lt; \"[-] Error: No SHELLDLL_DefView found in previous WorkerW.\\n\";\n        return FALSE;\n    }\n\n    lpWndInfo-&gt;Workerw1 = hWorkerPrevWnd;\n    lpWndInfo-&gt;Workerw2 = hWorkerWnd;\n    lpWndInfo-&gt;ShellDefView = hWorkerChildWnd;\n    return TRUE;\n}<\/code><\/pre>\n<h3 id=\"2.5.%20%E6%9B%B4%E6%94%B9%E7%88%B6%E7%AA%97%E5%8F%A3%E5%AE%9E%E7%8E%B0%E5%B5%8C%E5%85%A5%E5%A3%81%E7%BA%B8%E7%AA%97%E5%8F%A3\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.\u00a0\u66f4\u6539\u7236\u7a97\u53e3\u5b9e\u73b0\u5d4c\u5165\u58c1\u7eb8\u7a97\u53e3<br \/>\n   <\/span><br \/>\n  <\/h3>\n<p>\n   \u6b64\u65f6\u684c\u9762\u7ba1\u7406\u7a97\u53e3\u7684\u5c42\u6b21\u53d8\u6210 WorkerW \u5206\u7ec4\u5c42\u6b21\uff0c\u6211\u4eec\u53ea\u9700\u8981\u628a\u81ea\u5df1\u8fdb\u7a0b\u7684\u7a97\u53e3 \u201c\u5d4c\u5165\u201d \u8fdb\u53bb\u5373\u53ef\uff0c\u4f7f\u7528 SetParent \u66f4\u6539\u6307\u5b9a\u7a97\u53e3\u7684\u7236\u7a97\u53e3\u3002\u5176\u5b9a\u4e49\u5982\u4e0b\uff1a\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      HWND<br \/>\n     <\/strong><br \/>\n     SetParent(<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      HWND<br \/>\n     <\/strong><br \/>\n     hWndChild,<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      HWND<br \/>\n     <\/strong><br \/>\n     hWndNewParent<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     );<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \/*<br \/>\n     <br \/>\n     * \u53c2\u6570<br \/>\n     <br \/>\n     * [in] hWndChild<br \/>\n     <br \/>\n     * \u7c7b\u578b\uff1aHWND \u5b50\u7a97\u53e3\u7684\u53e5\u67c4\u3002<br \/>\n     <br \/>\n     * [in, optional] hWndNewParent<br \/>\n     <br \/>\n     * \u7c7b\u578b\uff1a<br \/>\n     <strong><br \/>\n      HWND<br \/>\n     <\/strong><br \/>\n     <br \/>\n     * \u65b0\u7236\u7a97\u53e3\u7684\u53e5\u67c4\u3002\u5982\u679c\u6b64\u53c2\u6570\u4e3a NULL\uff0c\u5219 \u684c\u9762\u7a97\u53e3 Program \u6210\u4e3a\u65b0\u7684\u7236\u7a97\u53e3\u3002<br \/>\n     <br \/>\n     * \u5982\u679c\u6b64\u53c2\u6570\u4e3a HWND_MESSAGE\uff0c\u5219\u5b50\u7a97\u53e3\u5c06\u6210\u4e3a\u4ec5\u6d88\u606f\u7a97\u53e3\u3002<br \/>\n     <br \/>\n     * \u8fd4\u56de\u503c<br \/>\n     <br \/>\n     * \u7c7b\u578b\uff1a<br \/>\n     <strong><br \/>\n      HWND<br \/>\n     <\/strong><br \/>\n     <br \/>\n     * \u5982\u679c\u51fd\u6570\u6210\u529f\uff0c\u5219\u8fd4\u56de\u503c\u662f\u524d\u4e00\u4e2a\u7236\u7a97\u53e3\u7684\u53e5\u67c4\u3002<br \/>\n     <br \/>\n     * \u5982\u679c\u51fd\u6570\u5931\u8d25\uff0c\u5219\u8fd4\u56de\u503c\u4e3a NULL \u3002<br \/>\n     <br \/>\n     * [#] \u53ef\u4ee5\u4f7f\u7528 GetParent \u6bd4\u5bf9\u7684\u65b9\u6cd5\u83b7\u77e5 SetParent \u8bbe\u7f6e\u662f\u5426\u6210\u529f<br \/>\n     <br \/>\n     * \u00a0 \u00a0 \u4f7f\u7528 GetLastError \u53ef\u80fd\u4f1a\u663e\u793a 5 \u62d2\u7edd\u8bbf\u95ee\u7684\u9519\u8bef\uff08 MSDN \u5199\u5f97\u6709\u8bef\uff09<br \/>\n     <br \/>\n     *\/<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   hWndChild \u53c2\u6570\u662f\u6211\u4eec\u81ea\u5df1\u7a97\u53e3\u53e5\u67c4\uff0c hWndNewParent \u662f WorkerW 2 \u6216\u8005 Progman \u7a97\u53e3\uff0c\u82e5\u7528 Progman \u4f5c\u4e3a Parent \u7a97\u53e3\uff0c\u8bb0\u4f4f\u9700\u8981\u9690\u85cf\u6389 Worker 2 \u7a97\u53e3\u3002\u90a3\u4e48\u65e2\u7136\u80fd\u628a\u6211\u4eec\u81ea\u5df1\u7a97\u53e3\u5d4c\u5165\u5230\u684c\u9762\u56fe\u6807\u4e0b\u9762\uff0c \u90a3\u4e48\u5728\u4e0a\u9762\u663e\u793a\u56fe\u7247\u3001\u89c6\u5c4f\u3001\u52a8\u753b\u7b49\u7b49\u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u4e0b\u9762\u662f\u6211\u628a\u6d4b\u8bd5\u7a97\u53e3\u5d4c\u5165\u5230\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\u4e0b\u7684\u6548\u679c\uff1a\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <strong><br \/>\n    \u7136\u800c\uff0c\u4ed4\u7ec6\u89c2\u5bdf\u56fe\u7247\uff0c\u6211\u4eec\u4f1a\u53d1\u73b0\u6d4b\u8bd5\u7a97\u53e3\u539f\u6765\u662f\u6700\u5927\u5316\u7684\uff08\u5168\u684c\u9762\uff09\uff0c\u4f46\u662f\u5728 SetParent \u4e4b\u540e\u7acb\u5373\u7f29\u5c0f\u5230\u9ed8\u8ba4\u5927\u5c0f\uff08Normal\uff09\u3002<br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u6b64\u5916\u53ea\u8981\u4e00\u6253\u5f00\u4efb\u52a1\u89c6\u56fe\u3001\u6309\u4e0b\u7ec4\u5408\u952e \u201cWin \u5fbd\u6807\u952e +\u00a0Tab\u201d\uff0c\u6216\u8005\u6309\u4e0b\u4efb\u52a1\u680f\u4e0a\u7684\u8fd9\u4e2a\u6309\u94ae<br \/>\n   \u3002\n  <\/p>\n<p>\n   \u6211\u4eec\u5d4c\u5165\u7684\u7a97\u53e3\u5c31\u4f1a\u663e\u793a\u5728\u684c\u9762\u56fe\u6807\u5217\u8868\u7a97\u53e3\u4e0a\u65b9\u3002\n  <\/p>\n<h4 id=\"2.5.1%20%E9%97%AE%E9%A2%98%E4%B8%80%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%9A\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.1 \u95ee\u9898\u4e00\u89e3\u51b3\u65b9\u6848\uff08\u66f4\u65b0\u7236\u7a97\u53e3\u95ee\u9898\uff09<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   \u901a\u8fc7\u518d\u6b21\u5206\u6790 MSDN \u7684\u8bb2\u89e3\uff0c\u53d1\u73b0\u5173\u952e\u6ce8\u91ca\uff1a\n  <\/p>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff081\uff09\u51fa\u4e8e\u517c\u5bb9\u6027\u539f\u56e0\uff0c<br \/>\n    <strong><br \/>\n     SetParent<br \/>\n    <\/strong><br \/>\n    \u4e0d\u4f1a\u4fee\u6539\u8981\u66f4\u6539\u5176\u7236\u7ea7\u7684\u7a97\u53e3\u7684<br \/>\n    <strong><br \/>\n     WS_CHILD<br \/>\n    <\/strong><br \/>\n    \u6216<br \/>\n    <strong><br \/>\n     WS_POPUP<br \/>\n    <\/strong><br \/>\n    \u7a97\u53e3\u6837\u5f0f\u3002 \u56e0\u6b64\uff0c\u5982\u679c<br \/>\n    <em><br \/>\n     hWndNewParent<br \/>\n    <\/em><br \/>\n    \u4e3a<br \/>\n    <strong><br \/>\n     NULL<br \/>\n    <\/strong><br \/>\n    \uff0c\u5219\u8fd8\u5e94\u6e05\u9664<br \/>\n    <strong><br \/>\n     WS_CHILD<br \/>\n    <\/strong><br \/>\n    \u4f4d\uff0c\u5e76\u5728\u8c03\u7528<br \/>\n    <strong><br \/>\n     SetParent<br \/>\n    <\/strong><br \/>\n    \u540e\u8bbe\u7f6e<br \/>\n    <strong><br \/>\n     WS_POPUP<br \/>\n    <\/strong><br \/>\n    \u6837\u5f0f\u3002 \u76f8\u53cd\uff0c\u5982\u679c<br \/>\n    <em><br \/>\n     hWndNewParent<br \/>\n    <\/em><br \/>\n    \u4e0d\u662f<br \/>\n    <strong><br \/>\n     NULL<br \/>\n    <\/strong><br \/>\n    \uff0c\u5e76\u4e14\u7a97\u53e3\u4ee5\u524d\u662f\u684c\u9762\u7684\u5b50\u7ea7\uff0c\u5219\u5e94\u5728\u8c03\u7528<br \/>\n    <strong><br \/>\n     SetParent<br \/>\n    <\/strong><br \/>\n    \u4e4b\u524d\u6e05\u9664<br \/>\n    <strong><br \/>\n     WS_POPUP<br \/>\n    <\/strong><br \/>\n    \u6837\u5f0f\u5e76\u8bbe\u7f6e<br \/>\n    <strong><br \/>\n     WS_CHILD<br \/>\n    <\/strong><br \/>\n    \u6837\u5f0f\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff082\uff09\u66f4\u6539\u7a97\u53e3\u7684\u7236\u7ea7\u65f6\uff0c\u5e94\u540c\u6b65\u4e24\u4e2a\u7a97\u53e3\u7684 UISTATE\u3002 \u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/menurc\/wm-changeuistate\" rel=\"nofollow\" title=\"WM_CHANGEUISTATE\"><br \/>\n     WM_CHANGEUISTATE<br \/>\n    <\/a><br \/>\n    \u548c<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/menurc\/wm-updateuistate\" rel=\"nofollow\" title=\"WM_UPDATEUISTATE\"><br \/>\n     WM_UPDATEUISTATE<br \/>\n    <\/a><br \/>\n    \u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff083\uff09\u5982\u679c<br \/>\n    <em><br \/>\n     hWndNewParent<br \/>\n    <\/em><br \/>\n    \u548c<br \/>\n    <em><br \/>\n     hWndChild<br \/>\n    <\/em><br \/>\n    \u4ee5\u4e0d\u540c\u7684 DPI \u611f\u77e5\u6a21\u5f0f\u8fd0\u884c\uff0c\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u6216\u9519\u8bef\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u6240\u4ee5\uff0c\u5728\u8bbe\u7f6e\u7236\u7a97\u53e3\u524d\uff0c\u4e00\u662f\uff1a\u5982\u679c\u7a97\u53e3\u662f POPUP \u7a97\u53e3\uff0c\u5e94\u8be5\u53bb\u9664 WS_POPUP \u6837\u5f0f\uff0c\u5e76\u624b\u52a8\u6dfb\u52a0 WS_CHILD \u6837\u5f0f\uff1b\u4e8c\u662f\uff0c\u5982\u679c\u7a97\u53e3\u7ebf\u7a0b\u7684 DPI \u8bbe\u7f6e\u4e0d\u76f8\u540c\uff0c\u5219\u5e94\u8be5\u9996\u5148\u540c\u6b65 DPI \u8bbe\u7f6e\uff0c\u7136\u540e\u518d\u8c03\u7528 SetParent \uff1b\u4e09\u662f\uff0c\u5982\u679c\u7a97\u53e3\u63a7\u4ef6\u88ab\u952e\u76d8\u51fb\u4e2d\uff0c\u9700\u8981\u5728\u8c03\u7528\u524d\u540c\u6b65 UI \u72b6\u6001\u3002\n  <\/p>\n<p>\n   \u6211\u4eec\u5e94\u8be5\u6309\u7167\u8981\u6c42\u6765\uff0c\u4e0d\u7136\u4f1a\u51fa\u73b0 WS_POPUP \u548c WS_CHILDWINDOW \u540c\u65f6\u5b58\u5728\u7684\u60c5\u51b5\uff0c\u7a97\u53e3\u7684\u884c\u4e3a\u4f1a\u6bd4\u8f83\u5947\u602a\uff0c\u5c31\u50cf\u8fd9\u91cc\u51fa\u73b0\u7a97\u53e3\u53d8\u6210\u5f39\u51fa\u5f0f\u7a97\u53e3\uff0c\u89e3\u51b3\u65b9\u6cd5\u662f\u4f7f\u7528 GetWindowLong \u548c SetWindowLong \u7ec4\u5408\u6765\u4fee\u6539\u7a97\u53e3\u6837\u5f0f\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">\/\/ \u6309\u7167\u8981\u6c42\u4fee\u6539\u7a97\u53e3\u6837\u5f0f\nLONG style = GetWindowLongW(hClientWnd, GWL_STYLE);\nstyle &amp;= ~WS_POPUP;\nstyle |= WS_CHILD;\nSetWindowLongW(hClientWnd, GWL_STYLE, style);\n\n\/\/ \u8bbe\u7f6e\u7236\u7a97\u53e3\nSetParent(hClientWnd, hNewParentWnd);<\/code><\/pre>\n<p>\n   \u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 GetProcessDPIAwareness \u68c0\u7d22\u8fdb\u7a0b\u7684 DPI \u8bbe\u7f6e\uff0c\u7136\u540e\u4f7f\u7528SetProcessDPIAwareness \u540c\u6b65\u8fdb\u7a0b DPI\uff0c\u6216\u8005\u4f7f\u7528 SetThreadDPIContext \u6765\u540c\u6b65\u7ebf\u7a0b DPI\uff08\u5982\u679c\u8bbe\u7f6e\u4e86\u6e05\u5355\u6587\u4ef6\uff0c\u53ea\u9700\u8981\u68c0\u67e5\u7ebf\u7a0b\u7684 DPI \uff0c\u4e00\u822c\u662f\u9ed8\u8ba4\u540c\u6b65\u7684\uff0c\u4e0d\u540c\u6b65\u518d\u53bb\u7528\u7ebf\u7a0b\u540c\u6b65 API \u4fee\u6539\uff09\u3002\n  <\/p>\n<p>\n   \u90a3\u4e48\uff0c\u5982\u4f55\u53d6\u6d88\u8bbe\u7f6e\u7236\u7a97\u53e3\u5462\uff1f\n  <\/p>\n<p>\n   \u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5c06 SetParent \u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3a NULL\uff0c\u5e76\u5728\u8c03\u7528\u524d\u53bb\u9664 WS_CHILD \u6837\u5f0f\uff0c\u5728\u8c03\u7528 SetParent \u540e\u6839\u636e\u8bb0\u5f55\u7684\u65e7\u7684\u7a97\u53e3\u6837\u5f0f\u6765\u6062\u590d\u6837\u5f0f\u3002\n  <\/p>\n<p>\n   \u4e00\u4e2a\u6062\u590d\u7a97\u53e3\u72ec\u7acb\u6027\u7684\u4ee3\u7801\u5982\u4e0b\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">\/\/ \u53d6\u6d88 WS_CHILD \u6837\u5f0f\nstyle = GetWindowLongW(hClientWnd, GWL_STYLE);\nstyle &amp;= ~WS_CHILD;\nSetWindowLongW(hClientWnd, GWL_STYLE, style);\n\/\/ \u7236\u7a97\u53e3\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\uff08\u4e3b\u684c\u9762\uff09\u7a97\u53e3\nSetParent(hClientWnd, NULL);\n\/\/ \u6062\u590d WS_POPUP \u6837\u5f0f\nstyle = GetWindowLongW(hClientWnd, GWL_STYLE);\nstyle |= WS_POPUP;\nSetWindowLongW(hClientWnd, GWL_STYLE, style);<\/code><\/pre>\n<hr\/>\n<p>\n   \u4e00\u4e2a\u7528\u4e8e\u6982\u5ff5\u9a8c\u8bc1\u7684\u5b8c\u6574\u4ee3\u7801\u5982\u4e0b\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;iostream&gt;\n#include &lt;Windows.h&gt;\n#include &lt;dwmapi.h&gt;\n#include &lt;shellscalingapi.h&gt;\n\n#pragma comment(lib, \"dwmapi.lib\")\n#pragma comment(lib, \"Shcore.lib\")\nusing namespace std;\n\nHWND hClientWnd = NULL;\n\nLRESULT CALLBACK __WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {\n\tHRESULT hr = S_OK;\n\tswitch (msg) {\n\tcase WM_CLOSE:\n\t\tMessageBoxW(NULL, L\"WM_CLOSE\", L\"NOTICE:!!!\", NULL);\n\t\tbreak;\n\tcase WM_SYSCOMMAND:\n\t{\n\t\tif (wParam == SC_CLOSE)\n\t\t{\n\t\t\tMessageBoxW(NULL, L\"SC_CLOSE\", L\"NOTICE:!!!\", NULL);\n\t\t}\n\t}\n\tbreak;\n\tcase WM_ACTIVATE:\n\t{\n\t\t\/\/ Extend the frame into the client area.\n\t\tMARGINS margins{};\n\n\t\tmargins.cxLeftWidth = 8;      \/\/ 8\n\t\tmargins.cxRightWidth = 8;    \/\/ 8\n\t\tmargins.cyBottomHeight = 20; \/\/ 20\n\t\tmargins.cyTopHeight = 27;       \/\/ 27\n\n\t\thr = DwmExtendFrameIntoClientArea(hWnd, &amp;margins);\n\n\t\tif (!SUCCEEDED(hr))\n\t\t{\n\t\t\t\/\/ Handle the error.\n\t\t}\n\t}\n\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\n\treturn DefWindowProc(hWnd, msg, wParam, lParam);\n}\n\n\nDWORD CreateTestChildWindow(void* args)\n{\n\t\/\/ \u7a97\u53e3\u5c5e\u6027\u521d\u59cb\u5316\n\tHINSTANCE hIns = GetModuleHandleW(0);\n\tWNDCLASSEXW wc{};\n\twc.cbSize = sizeof(wc);\t\t\t\t\t\t\t\t\/\/ \u5b9a\u4e49\u7ed3\u6784\u5927\u5c0f\n\twc.style = CS_HREDRAW | CS_VREDRAW;\t\t\t\t\t\/\/ \u5982\u679c\u6539\u53d8\u4e86\u5ba2\u6237\u533a\u57df\u7684\u5bbd\u5ea6\u6216\u9ad8\u5ea6\uff0c\u5219\u91cd\u65b0\u7ed8\u5236\u6574\u4e2a\u7a97\u53e3 \n\twc.cbClsExtra = 0;\t\t\t\t\t\t\t\t\t\/\/ \u7a97\u53e3\u7ed3\u6784\u7684\u9644\u52a0\u5b57\u8282\u6570\n\twc.cbWndExtra = 0;\t\t\t\t\t\t\t\t\t\/\/ \u7a97\u53e3\u5b9e\u4f8b\u7684\u9644\u52a0\u5b57\u8282\u6570\n\twc.hInstance = hIns;\t\t\t\t\t\t\t\t\/\/ \u672c\u6a21\u5757\u7684\u5b9e\u4f8b\u53e5\u67c4\n\twc.hIcon = NULL;\t\t\t\t\t\t\t\t\t\/\/ \u56fe\u6807\u7684\u53e5\u67c4\n\twc.hIconSm = NULL;\t\t\t\t\t\t\t\t\t\/\/ \u548c\u7a97\u53e3\u7c7b\u5173\u8054\u7684\u5c0f\u56fe\u6807\u7684\u53e5\u67c4\n\twc.hbrBackground = (HBRUSH)COLOR_WINDOW;\t\t\t\/\/ \u80cc\u666f\u753b\u5237\u7684\u53e5\u67c4\n\twc.hCursor = NULL;\t\t\t\t\t\t\t\t\t\/\/ \u5149\u6807\u7684\u53e5\u67c4\n\twc.lpfnWndProc = __WndProc;\t\t\t\t\t\t\t\/\/ \u7a97\u53e3\u5904\u7406\u51fd\u6570\u7684\u6307\u9488\n\twc.lpszMenuName = NULL;\t\t\t\t\t\t\t\t\/\/ \u6307\u5411\u83dc\u5355\u7684\u6307\u9488\n\twc.lpszClassName = L\"TestWndClass\";\t\t\t\t\t\/\/ \u6307\u5411\u7c7b\u540d\u79f0\u7684\u6307\u9488\n\n\t\/\/ \u4e3a\u7a97\u53e3\u6ce8\u518c\u4e00\u4e2a\u7a97\u53e3\u7c7b\n\tif (!RegisterClassExW(&amp;wc)) {\n\t\tcout &lt;&lt; \"RegisterClassEx error : \" &lt;&lt; GetLastError() &lt;&lt; endl;\n\t}\n\tconst auto cx{ GetSystemMetrics(SM_CXFULLSCREEN) }; \/\/ \u53d6\u663e\u793a\u5668\u5c4f\u5e55\u9ad8\u5bbd\n\tconst auto cy{ GetSystemMetrics(SM_CYFULLSCREEN) };\n\tconst auto x{ (cx &gt;&gt; 1 ) - 400 };\n\tconst auto y{ (cy &gt;&gt; 1 ) - 300 };\n\n\t\/\/ \u521b\u5efa\u7a97\u53e3\n\tHWND hWnd = CreateWindowExW(\n\t\tWS_EX_APPWINDOW,\t\t\t\t\/\/ \u7a97\u53e3\u6269\u5c55\u6837\u5f0f\uff1a\u9876\u7ea7\u7a97\u53e3\n\t\tL\"TestWndClass\",\t\t\t\t\/\/ \u7a97\u53e3\u7c7b\u540d\n\t\tL\"TestWindows\",\t\t\t\t\/\/ \u7a97\u53e3\u6807\u9898\n\t\tWS_POPUP| \\\n\t\tWS_ACTIVECAPTION | \\\n\t\tWS_VISIBLE | \\\n\t\tWS_CAPTION | \\\n\t\tWS_SYSMENU | \\\n\t\tWS_THICKFRAME | \\\n\t\tWS_MINIMIZEBOX | \\\n\t\tWS_MAXIMIZEBOX,\t\t\/\/ \u7a97\u53e3\u6837\u5f0f\uff1a\u91cd\u53e0\u7a97\u53e3\n\t\tx,\t\t\t\t\t\t\t\/\/ \u7a97\u53e3\u521d\u59cbx\u5750\u6807\n\t\ty,\t\t\t\t\t\t\t\/\/ \u7a97\u53e3\u521d\u59cby\u5750\u6807\n\t\t800,\t\t\t\t\t\t\/\/ \u7a97\u53e3\u5bbd\u5ea6\n\t\t600,\t\t\t\t\t\t\/\/ \u7a97\u53e3\u9ad8\u5ea6\n\t\t0,\t\t\t\t\t\t\t\/\/ \u7236\u7a97\u53e3\u53e5\u67c4\n\t\t0,\t\t\t\t\t\t\t\/\/ \u83dc\u5355\u53e5\u67c4 \n\t\thIns,\t\t\t\t\t\t\/\/ \u4e0e\u7a97\u53e3\u5173\u8054\u7684\u6a21\u5757\u5b9e\u4f8b\u7684\u53e5\u67c4\n\t\t0\t\t\t\t\t\t\t\/\/ \u7528\u6765\u4f20\u9012\u7ed9\u7a97\u53e3WM_CREATE\u6d88\u606f\n\t);\n\n\tif (hWnd == 0) {\n\t\tcout &lt;&lt; \"CreateWindowEx error : \" &lt;&lt; GetLastError() &lt;&lt; endl;\n\t\treturn 0;\n\t}\n\thClientWnd = hWnd;\n\tUpdateWindow(hWnd);\n\tShowWindow(hWnd, SW_SHOW);\n\n\t\/\/ \u6d88\u606f\u5faa\u73af\uff08\u6ca1\u6709\u4f1a\u5bfc\u81f4\u7a97\u53e3\u5361\u6b7b\uff09\n\tMSG msg = { 0 };\n\twhile (msg.message != WM_QUIT) {\n\t\t\/\/ \u4ece\u6d88\u606f\u961f\u5217\u4e2d\u5220\u9664\u4e00\u6761\u6d88\u606f\n\t\tif (PeekMessageW(&amp;msg, 0, 0, 0, PM_REMOVE)) {\n\t\t\tDispatchMessageW(&amp;msg);\n\t\t}\n\t}\n\treturn 0;\n}\n\nint main()\n{\n\tSetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);\n\tCreateThread(NULL, NULL, CreateTestChildWindow, NULL, 0, 0);\n\n\twhile (!hClientWnd) {\n\t\t\/\/Sleep(10);\n\t}\n\tif (!hClientWnd) return 0;\n\tsystem(\"pause\");\n\tHWND hDesktop = FindWindowW(L\"Notepad\", NULL);\n\tHWND hChildTextWnd = FindWindowExW(hDesktop, NULL, \n\t\tL\"NotepadTextBox\", NULL);\n\tprintf(\"%2p %2p\\n\", hClientWnd, hDesktop);\n\tif (!hDesktop || !hChildTextWnd)\n\t{\n\t\tsystem(\"pause\");\n\t\treturn 0;\n\t}\n\tSetFocus(hChildTextWnd);\n\tRECT prtrc = { 0 },\n\t\t cntrc = { 0 };\n\tGetWindowRect(hChildTextWnd, &amp;prtrc);\n\tGetWindowRect(hClientWnd, &amp;cntrc);\n\tint prtcx = prtrc.right - prtrc.left;\n\tint prtcy = prtrc.bottom - prtrc.top;\n\tint cntcx = cntrc.right - cntrc.left;\n\tint cntcy = cntrc.bottom - cntrc.top;\n\tint Child_X = (prtcx &gt;&gt; 1) + prtrc.left - (cntcx &gt;&gt; 1);\n\tint Child_Y = (prtcy &gt;&gt; 1) + prtrc.top - (cntcy &gt;&gt; 1);\n\tSetWindowPos(\n\t\thClientWnd, NULL, \n\t\tChild_X, Child_Y, \n\t\t0, 0, \n\t\tSWP_NOSIZE | SWP_NOZORDER\n\t);\n\tUpdateWindow(hClientWnd);\n\tLONG style = GetWindowLongW(hClientWnd, GWL_STYLE);\n\tstyle &amp;= ~WS_POPUP;\n\tstyle |= WS_CHILD;\n\tSetWindowLongW(hClientWnd, GWL_STYLE, style);\n\tSetParent(hClientWnd, hDesktop);\n\tChild_X -= prtrc.left;\n\tChild_Y -= prtrc.top;\n\tSetWindowPos(\n\t\thClientWnd, NULL,\n\t\tChild_X, Child_Y,\n\t\t0, 0,\n\t\tSWP_NOSIZE | SWP_NOZORDER\n\t);\n\t\n\tsystem(\"pause\");\n\tstyle = GetWindowLongW(hClientWnd, GWL_STYLE);\n\tstyle &amp;= ~WS_CHILD;\n\tSetWindowLongW(hClientWnd, GWL_STYLE, style);\n\tSetParent(hClientWnd, NULL);\n\tstyle = GetWindowLongW(hClientWnd, GWL_STYLE);\n\tstyle |= WS_POPUP;\n\tSetWindowLongW(hClientWnd, GWL_STYLE, style);\n\tsystem(\"pause\");\n\treturn 0;\n}<\/code><\/pre>\n<h4 id=\"2.5.2%20%E9%97%AE%E9%A2%98%E4%BA%8C%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.2 \u95ee\u9898\u4e8c\u89e3\u51b3\u65b9\u6848\uff08\u865a\u62df\u684c\u9762\u548c\u6269\u5c55\u5c4f\u5206\u8fa8\u7387\u95ee\u9898\uff09<br \/>\n   <\/span><br \/>\n  <\/h4>\n<blockquote>\n<p>\n    <strong><br \/>\n     <span style=\"color:#fe2c24\"><br \/>\n      \u63d0\u793a\uff082024.06.10\uff09<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff1a\u5df2\u77e5\u76ee\u524d\u7684\u4ee3\u7801\u6ca1\u6709\u8003\u8651\u5230\u5728\u8fd0\u884c\u5468\u671f\u5185\uff0c\u663e\u793a\u5668\u5206\u8fa8\u7387\u53d1\u751f\u53d8\u5316\u7684\u95ee\u9898\u3002\u8fd9\u4f1a\u5bfc\u81f4\u6211\u4eec\u7684\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u7684\u5927\u5c0f\u51fa\u73b0\u9519\u8bef\u3002\u89e3\u51b3\u65b9\u6cd5\u5c31\u662f\u518d\u521b\u5efa\u4e00\u4e2a\u9876\u7ea7\u7a97\u53e3\u53bb\u63a5\u6536\u00a0WM_DISPLAYCHANGE \u6d88\u606f\uff0c\u8fd9\u4e2a\u6d88\u606f\u4f1a\u5728\u663e\u793a\u5668\u5206\u8fa8\u7387\u53d8\u5316\u65f6\u53d1\u9001\u81f3\u6240\u6709\u9876\u7ea7\u7a97\u53e3\u3002\u4f46\u662f\u662f\u5426\u4f20\u9012\u5230\u5b50\u7ea7\u53d6\u51b3\u4e8e\u7a0b\u5e8f\u81ea\u8eab\u7684\u8bbe\u7f6e\uff0c\u7cfb\u7edf\u53ea\u8d1f\u8d23\u9876\u7ea7\u7a97\u53e3\u7684\u6d88\u606f\u53d1\u9001\u3002\u7ecf\u8fc7\u9a8c\u8bc1\uff0cexplorer \u7684\u684c\u9762\u7ba1\u7406\u5c42\u7a97\u53e3\uff08\u5982\uff1aWorkerW\uff09\u4e0d\u4f1a\u5c06\u6d88\u606f\u4f20\u9012\u7ed9\u5b50\u7a97\u53e3\u3002\u6240\u4ee5\uff0c<br \/>\n    <\/span><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u6211\u4eec\u7684\u7a0b\u5e8f\u5fc5\u987b\u521b\u5efa\u4e00\u4e2a 0 \u5927\u5c0f\u7684 Popup \u7a97\u53e3\uff0c\u5b83\u53ef\u4ee5\u5177\u6709 WS_EX_TOOLWINDOW \u6837\u5f0f\u5e76\u6392\u9664\u6807\u9898\u680f\u3001\u8fb9\u6846\u548c\u7cfb\u7edf\u83dc\u5355\uff0c\u8fd9\u4f7f\u5f97\u6211\u4eec\u7684\u7a97\u53e3\u4e0d\u88ab\u7528\u6237\u770b\u89c1\u3002\u5f53\u63a5\u6536\u5230\u6d88\u606f\u65f6\u5019\uff0c\u901a\u77e5\u7ed9\u6211\u4eec\u7684\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u3002<br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff08\u4e3a\u4ec0\u4e48\u4e0d\u7528\u4ec5\u6d88\u606f\u7a97\u53e3\uff1f\u56e0\u4e3a\u6709\u4e9b\u7279\u6b8a\u7cfb\u7edf\u6d88\u606f\u4e0d\u4f1a\u4f18\u5148\u53d1\u9001\u81f3\u4ec5\u6d88\u606f\u7a97\u53e3\uff09<br \/>\n    <\/span>\n   <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n      \u5206\u8fa8\u7387\u52a8\u6001\u53d8\u5316\u95ee\u9898<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<\/blockquote>\n<p>\n   \u5982\u4f55\u89e3\u51b3\u7a97\u53e3\u5927\u5c0f\u6539\u53d8\u7684\u95ee\u9898\u5462\uff1f\n  <\/p>\n<p>\n   \uff08<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    2024.06.10 \u6ce8\uff1a\u4e3a\u52a8\u6001\u58c1\u7eb8\u518d\u8bbe\u7f6e\u5b50\u7a97\u53e3\u65f6\uff0c SetWindowPlacement \u51fd\u6570\u8fd8\u662f\u9700\u8981\u7684\uff0c\u8fd9\u53ef\u4ee5\u4fdd\u8bc1\u4e0b\u6b21\u8fd8\u539f\u7a97\u53e3\u5927\u5c0f\u65f6\uff0c\u5927\u5c0f\u4e0d\u9700\u8981\u591a\u6b21\u8c03\u6574<br \/>\n   <\/span><br \/>\n   \uff09\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u7b56\u7565\uff1a\u901a\u8fc7\u76d1\u89c6\u5668\u77e9\u5f62\u4fe1\u606f\u8ba1\u7b97<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u9996\u5148\u4f7f\u7528<br \/>\n    <strong><br \/>\n     MonitorFromWindow<br \/>\n    <\/strong><br \/>\n    \u51fd\u6570\u68c0\u7d22\u5177\u6709\u4e0e\u6307\u5b9a\u7a97\u53e3\u8fb9\u754c\u77e9\u5f62\u4ea4\u96c6\u9762\u79ef\u6700\u5927\u7684\u663e\u793a\u76d1\u89c6\u5668\u7684\u53e5\u67c4\u3002\u5373\u6839\u636e\u7a97\u53e3\u53e5\u67c4\u83b7\u53d6\u6240\u5728\u76d1\u89c6\u5668\u7684\u8bbe\u5907\u53e5\u67c4\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u8be5\u51fd\u6570\u5b9a\u4e49\u5982\u4e0b\uff1a<br \/>\n   <\/span>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      HMONITOR<br \/>\n     <\/strong><br \/>\n     MonitorFromWindow(<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      HWND<br \/>\n     <\/strong><br \/>\n     hwnd,<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      DWORD<br \/>\n     <\/strong><br \/>\n     dwFlags<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     );<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u5982\u679c\u7a97\u53e3\u4e0e\u4e00\u4e2a\u6216\u591a\u4e2a\u663e\u793a\u76d1\u89c6\u5668\u77e9\u5f62\u76f8\u4ea4\uff0c\u5219\u8fd4\u56de\u503c\u4e3a\u663e\u793a\u76d1\u89c6\u5668\u7684<br \/>\n    <strong><br \/>\n     HMONITOR<br \/>\n    <\/strong><br \/>\n    \u53e5\u67c4\uff0c\u8be5\u53e5\u67c4\u4e0e\u7a97\u53e3\u7684\u4ea4\u96c6\u9762\u79ef\u6700\u5927\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u5982\u679c\u7a97\u53e3\u4e0d\u4e0e\u663e\u793a\u76d1\u89c6\u5668\u76f8\u4ea4\uff0c\u5219\u8fd4\u56de\u503c\u53d6\u51b3\u4e8e<br \/>\n    <em><br \/>\n     dwFlags<br \/>\n    <\/em><br \/>\n    \u7684\u503c\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u6b64\u53c2\u6570\u7684\u53d6\u503c\u53ef\u4e3a\u4e0b\u5217\u503c\u4e4b\u4e00\uff1a<br \/>\n   <\/span>\n  <\/p>\n<table>\n<tbody>\n<tr>\n<th>\n      <span style=\"color:#0d0016\"><br \/>\n       \u503c<br \/>\n      <\/span>\n     <\/th>\n<th>\n      <span style=\"color:#0d0016\"><br \/>\n       \u542b\u4e49<br \/>\n      <\/span>\n     <\/th>\n<\/tr>\n<tr>\n<td>\n      <a id=\"MONITOR_DEFAULTTONEAREST\"><br \/>\n      <\/a><br \/>\n      <a id=\"monitor_defaulttonearest\"><br \/>\n      <\/a><\/p>\n<p>\n       <span style=\"color:#0d0016\"><br \/>\n        <strong><br \/>\n         MONITOR_DEFAULTTONEAREST<br \/>\n        <\/strong><br \/>\n       <\/span>\n      <\/p>\n<\/td>\n<td>\n      <span style=\"color:#0d0016\"><br \/>\n       \u8fd4\u56de\u6700\u9760\u8fd1\u7a97\u53e3\u7684\u663e\u793a\u76d1\u89c6\u5668\u7684\u53e5\u67c4\u3002<br \/>\n      <\/span>\n     <\/td>\n<\/tr>\n<tr>\n<td>\n      <a id=\"MONITOR_DEFAULTTONULL\"><br \/>\n      <\/a><br \/>\n      <a id=\"monitor_defaulttonull\"><br \/>\n      <\/a><\/p>\n<p>\n       <span style=\"color:#0d0016\"><br \/>\n        <strong><br \/>\n         MONITOR_DEFAULTTONULL<br \/>\n        <\/strong><br \/>\n       <\/span>\n      <\/p>\n<\/td>\n<td>\n      <span style=\"color:#0d0016\"><br \/>\n       \u8fd4\u56de<br \/>\n       <strong><br \/>\n        NULL<br \/>\n       <\/strong><br \/>\n       \u3002<br \/>\n      <\/span>\n     <\/td>\n<\/tr>\n<tr>\n<td>\n      <a id=\"MONITOR_DEFAULTTOPRIMARY\"><br \/>\n      <\/a><br \/>\n      <a id=\"monitor_defaulttoprimary\"><br \/>\n      <\/a><\/p>\n<p>\n       <span style=\"color:#0d0016\"><br \/>\n        <strong><br \/>\n         MONITOR_DEFAULTTOPRIMARY<br \/>\n        <\/strong><br \/>\n       <\/span>\n      <\/p>\n<\/td>\n<td>\n      <span style=\"color:#0d0016\"><br \/>\n       \u8fd4\u56de\u4e3b\u663e\u793a\u76d1\u89c6\u5668\u7684\u53e5\u67c4\u3002<br \/>\n      <\/span>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u663e\u7136\uff0c\u6211\u4eec\u5e94\u8be5\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a\uff1a<br \/>\n    <strong><br \/>\n     MONITOR_DEFAULTTONEAREST<br \/>\n    <\/strong><br \/>\n    \u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u8c03\u7528\u6210\u529f\u540e\u83b7\u5f97 HMONITOR \u53e5\u67c4\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u7136\u540e\uff0c\u8c03\u7528<br \/>\n    <strong><br \/>\n     GetMonitorInfo<br \/>\n    <\/strong><br \/>\n    \u51fd\u6570\u68c0\u7d22\u6709\u5173\u663e\u793a\u76d1\u89c6\u5668\u7684\u4fe1\u606f\u3002\u53c2\u6570\u4e8c\u6307\u5411\u7ed3\u6784\u4f53\u6307\u9488\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     MONITORINFOEX<br \/>\n    <\/strong><br \/>\n    \u7ed3\u6784\u5305\u542b\u6709\u5173\u663e\u793a\u76d1\u89c6\u5668\u7684\u4fe1\u606f\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/winuser\/nf-winuser-getmonitorinfoa\" rel=\"nofollow\" title=\"GetMonitorInfo\"><br \/>\n     GetMonitorInfo<br \/>\n    <\/a><br \/>\n    \u51fd\u6570\u5c06\u4fe1\u606f\u5b58\u50a8\u5230<br \/>\n    <strong><br \/>\n     MONITORINFOEX<br \/>\n    <\/strong><br \/>\n    \u7ed3\u6784\u6216<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/winuser\/ns-winuser-monitorinfo\" rel=\"nofollow\" title=\"MONITORINFO \u7ed3\u6784\u4e2d\"><br \/>\n     MONITORINFO \u7ed3\u6784\u4e2d<br \/>\n    <\/a><br \/>\n    \u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     MONITORINFOEX<br \/>\n    <\/strong><br \/>\n    \u7ed3\u6784\u662f<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/winuser\/ns-winuser-monitorinfo\" rel=\"nofollow\" title=\"MONITORINFO\"><br \/>\n     MONITORINFO<br \/>\n    <\/a><br \/>\n    \u7ed3\u6784\u7684\u8d85\u96c6\u3002<br \/>\n    <strong><br \/>\n     MONITORINFOEX<br \/>\n    <\/strong><br \/>\n    \u7ed3\u6784\u6dfb\u52a0\u5b57\u7b26\u4e32\u6210\u5458\u4ee5\u5305\u542b\u663e\u793a\u76d1\u89c6\u5668\u7684\u540d\u79f0\u3002<br \/>\n   <\/span>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     typedef struct tagMONITORINFO {<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      DWORD<br \/>\n     <\/strong><br \/>\n     cbSize;\u00a0 \u00a0 \u00a0 \u00a0 \/\/\u00a0\u7ed3\u6784\u5927\u5c0f\uff08\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff09\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      RECT<br \/>\n     <\/strong><br \/>\n     rcMonitor;\u00a0 \u00a0 \u00a0 \u00a0 \/\/\u00a0\u4ee5\u865a\u62df\u5c4f\u5e55\u5750\u6807\u8868\u793a\u7684\u663e\u793a\u76d1\u89c6\u5668\u77e9\u5f62<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      RECT<br \/>\n     <\/strong><br \/>\n     rcWork;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/\u00a0\u6307\u5b9a\u663e\u793a\u76d1\u89c6\u5668\u7684\u5de5\u4f5c\u533a\u57df\u77e9\u5f62\uff08\u865a\u62df\u5c4f\u5e55\u5750\u6807\uff09<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      DWORD<br \/>\n     <\/strong><br \/>\n     dwFlags;\u00a0 \u00a0 \u00a0 \/\/\u00a0\u4e00\u7ec4\u8868\u793a\u663e\u793a\u76d1\u89c6\u5668\u5c5e\u6027\u7684\u6807\u5fd7\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     } MONITORINFO, *LPMONITORINFO;<br \/>\n    <\/span>\n   <\/p>\n<\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \/\/ \u6269\u5c55\u7ed3\u6784\u00a0MONITORINFOEXW<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     typedef struct tagMONITORINFOEXW : tagMONITORINFO {<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      WCHAR<br \/>\n     <\/strong><br \/>\n     szDevice[CCHDEVICENAME];\u00a0 \u00a0 \u00a0 \u00a0 \/\/ \u6307\u5b9a\u6b63\u5728\u4f7f\u7528\u7684\u76d1\u89c6\u5668\u7684\u8bbe\u5907\u540d\u79f0\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     } MONITORINFOEXW, *LPMONITORINFOEXW;<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u7531\u7ed3\u6784\u4f53\u4e2d\u7684\u00a0RECT rcMonitor\u00a0\u53ef\u4ee5\u83b7\u53d6\u76d1\u89c6\u5668\u7a97\u53e3\u7684\u903b\u8f91\u77e9\u5f62\uff0c\u5982\u679c\u518d\u83b7\u53d6\u5230\u76d1\u89c6\u5668\u7a97\u53e3\u7684\u7269\u7406\u77e9\u5f62\uff0c\u5373\u53ef\u76f8\u9664\u83b7\u5f97\u7f29\u653e\u56e0\u5b50\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u8fd9\u91cc\u4f7f\u7528<br \/>\n    <strong><br \/>\n     EnumDisplaySettings<br \/>\n    <\/strong><br \/>\n    \u51fd\u6570\u6765\u83b7\u53d6\u7269\u7406\u77e9\u5f62\u4fe1\u606f\u3002<br \/>\n    <strong><br \/>\n     EnumDisplaySettings<br \/>\n    <\/strong><br \/>\n    \u51fd\u6570\u53ef\u4ee5\u68c0\u7d22\u663e\u793a\u8bbe\u5907\u56fe\u5f62\u6a21\u5f0f\u4e4b\u4e00\u7684\u76f8\u5173\u4fe1\u606f\u3002 \u4e0b\u9762\u662f\u8fd9\u4e2a\u51fd\u6570\u7684\u5b9a\u4e49\uff1a<br \/>\n   <\/span>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      BOOL<br \/>\n     <\/strong><br \/>\n     EnumDisplaySettingsW(<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      LPCTSTR<br \/>\n     <\/strong><br \/>\n     lpszDeviceName,<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [in]<br \/>\n     <strong><br \/>\n      DWORD<br \/>\n     <\/strong><br \/>\n     iModeNum,<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [out]<br \/>\n     <strong><br \/>\n      DEVMODEA<br \/>\n     <\/strong><br \/>\n     *lpDevMode<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     );<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u5176\u4e2d\uff0c<br \/>\n   <\/span><br \/>\n   <span style=\"color:#0d0016\"><br \/>\n    <code><br \/>\n     iModeNum<br \/>\n    <\/code><br \/>\n    \u53c2\u6570\u8868\u793a\u8981\u68c0\u7d22\u7684\u4fe1\u606f\u7684\u7c7b\u578b\u3002 \u6b64\u503c\u53ef\u4ee5\u662f\u56fe\u5f62\u6a21\u5f0f\u7d22\u5f15\u6216\u4ee5\u4e0b\u503c\u4e4b\u4e00\u3002<br \/>\n   <\/span>\n  <\/p>\n<table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<th>\n      <span style=\"color:#0d0016\"><br \/>\n       \u503c<br \/>\n      <\/span>\n     <\/th>\n<th>\n      <span style=\"color:#0d0016\"><br \/>\n       \u542b\u4e49<br \/>\n      <\/span>\n     <\/th>\n<\/tr>\n<tr>\n<td>\n      <a id=\"ENUM_CURRENT_SETTINGS\"><br \/>\n      <\/a><br \/>\n      <a id=\"enum_current_settings\"><br \/>\n      <\/a><\/p>\n<p>\n       <span style=\"color:#0d0016\"><br \/>\n        <strong><br \/>\n         ENUM_CURRENT_SETTINGS<br \/>\n        <\/strong><br \/>\n       <\/span>\n      <\/p>\n<\/td>\n<td>\n      <span style=\"color:#0d0016\"><br \/>\n       \u68c0\u7d22\u663e\u793a\u8bbe\u5907\u7684\u5f53\u524d\u8bbe\u7f6e\u3002<br \/>\n      <\/span>\n     <\/td>\n<\/tr>\n<tr>\n<td>\n      <a id=\"ENUM_REGISTRY_SETTINGS\"><br \/>\n      <\/a><br \/>\n      <a id=\"enum_registry_settings\"><br \/>\n      <\/a><\/p>\n<p>\n       <span style=\"color:#0d0016\"><br \/>\n        <strong><br \/>\n         ENUM_REGISTRY_SETTINGS<br \/>\n        <\/strong><br \/>\n       <\/span>\n      <\/p>\n<\/td>\n<td>\n      <span style=\"color:#0d0016\"><br \/>\n       \u68c0\u7d22\u5f53\u524d\u5b58\u50a8\u5728\u6ce8\u518c\u8868\u4e2d\u7684\u663e\u793a\u8bbe\u5907\u7684\u8bbe\u7f6e\u3002<br \/>\n      <\/span>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u663e\u7136\uff0c\u6211\u4eec\u9700\u8981\u5c06\u8be5\u53c2\u8bbe\u7f6e\u4e3a<br \/>\n    <strong><br \/>\n     ENUM_CURRENT_SETTINGS \u3002<br \/>\n    <\/strong><br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u53c2\u6570\u8bbe\u7f6e\u4ee5\u53ca\u5904\u7406\u5982\u4e0b\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">DEVMODE dm{};\ndm.dmSize = sizeof(dm);\ndm.dmDriverExtra = 0;\nEnumDisplaySettingsW(miex.szDevice, ENUM_CURRENT_SETTINGS, &amp;dm);\nint cxPhysical = dm.dmPelsWidth;    \/\/ x \u8f74\u6807\u5ea6\u7684\u957f\u5ea6\nint cyPhysical = dm.dmPelsHeight;    \/\/ y \u8f74\u6807\u5ea6\u7684\u957f\u5ea6<\/code><\/pre>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u63a5\u4e0b\u6765\u5c31\u662f\u6700\u7b80\u5355\u7684\u7f29\u653e\u6bd4\u4f8b\u8ba1\u7b97\uff0c\u6839\u636e\u7cfb\u7edf\u6570\u636e\uff0c\u8fd4\u56de\u7684\u6d6e\u70b9\u6570\u662f\u53d6\u820d\u4e3a 2 \u4f4d\u6709\u6548\u6570\u5b57\uff0c\u6309\u5411\u4e0a\u53d6\u7684\u65b9\u6cd5\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">\/\/ \u7f29\u653e\u6bd4\u4f8b\u8ba1\u7b97\ndouble horzScale = ((double)cxPhysical \/ (double)cxLogical);\ndouble vertScale = ((double)cyPhysical \/ (double)cyLogical);\n\n\/\/ \u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6570\u53d6\u5c0f\u6570\u4f4d,\u8f6c\u6362\u4e3a\u767e\u5206\u5236\u6570\u503c\n\/\/ \u5148\u5c0f\u6570\u6709\u6548\u4f4d\u4f4d\u56db\u820d\u4e94\u5165\u8fdb\u4f4d\u5230\u4e2a\u4f4d\u524d\uff0c\u7136\u540eint\u622a\u65ad\u53d6\u6574\nint i_hScale = (int)((horzScale) * 100 + 0.5);\ndouble m_hScale = i_hScale \/ 100.0;\/\/ \u767e\u5206\u5236\u8f6c\u6362\u4e3a\u6709\u6548\u5c0f\u6570\u4f4d\n\nint i_vScale = (int)((vertScale) * 100.0 + 0.5);\ndouble m_vScale = i_vScale \/ 100.0;<\/code><\/pre>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    <strong><br \/>\n     \uff08\u6700\u65b0\u8865\u5145\uff09\u8fd0\u884c\u65f6\u68c0\u6d4b\u865a\u62df\u684c\u9762\u5207\u6362\u548c\u540c\u6b65\u7a97\u53e3\u6240\u5728\u663e\u793a\u5668\u5206\u8fa8\u7387\u7684\u66f4\u6539<br \/>\n    <\/strong><br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#0d0016\"><br \/>\n    \u4ee5\u4e0b\u4ee3\u7801\u5c5e\u4e8e\u5b9e\u9a8c\u4ee3\u7801\uff0c\u8fd8\u6709\u5f85\u4f18\u5316\uff08\u6682\u4e0d\u80fd\u533a\u5206\u591a\u663e\u793a\u5668\uff09\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;shobjidl.h&gt;\n#include &lt;profileapi.h&gt;\n#include &lt;iostream&gt;\n#include &lt;mutex&gt;\n\n#pragma comment(lib, \"user32.lib\")\n\n\/\/ Global variables\nHINSTANCE hInst;\nHWND hWnd;\nUINT_PTR timerId = 0;\nIVirtualDesktopManager* pDesktopManager = nullptr;\nGUID currentDesktopId;\nLARGE_INTEGER StartingTime = { 0 };\nLARGE_INTEGER PerformFrequency = { 0 };\nLONGLONG LastAdjustMonitorTime = 0;\nbool IsSwitchDeskOrInitWindow = true;\n\/\/ Global mutex object\nstd::mutex switchDesk_mtx;\n\n\nconst wchar_t CLASS_NAME[] = L\"FullscreenWindowClass\";\n\n\/\/ Forward declarations of functions included in this code module:\nATOM                MyRegisterClass(HINSTANCE hInstance);\nBOOL                InitInstance(HINSTANCE, int);\nLRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);\nvoid                CheckDesktopSwitch();\nvoid                AdjustWindowToMonitor();\nBOOL                InitPerformanceCounter();\nLONGLONG            GetPerformanceTime();\n\nint APIENTRY wWinMain(_In_ HINSTANCE hInstance,\n    _In_opt_ HINSTANCE hPrevInstance,\n    _In_ LPWSTR    lpCmdLine,\n    _In_ int       nCmdShow)\n{\n    UNREFERENCED_PARAMETER(hPrevInstance);\n    UNREFERENCED_PARAMETER(lpCmdLine);\n\n    InitPerformanceCounter();\n\n    \/\/ Initialize COM\n    CoInitialize(nullptr);\n\n    \/\/ Create VirtualDesktopManager instance\n    HRESULT hr = CoCreateInstance(CLSID_VirtualDesktopManager, nullptr, CLSCTX_ALL, IID_PPV_ARGS(&amp;pDesktopManager));\n    if (FAILED(hr))\n    {\n        MessageBoxW(nullptr, L\"Failed to create VirtualDesktopManager instance\", L\"Error\", MB_OK | MB_ICONERROR);\n        return FALSE;\n    }\n\n    \/\/ Register window class\n    MyRegisterClass(hInstance);\n\n    \/\/ Perform application initialization\n    if (!InitInstance(hInstance, nCmdShow))\n    {\n        return FALSE;\n    }\n\n    \/\/HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_ARROW));\n\n    MSG msg;\n\n    \/\/ Main message loop\n    while (GetMessageW(&amp;msg, nullptr, 0, 0))\n    {\n        \/\/if (!TranslateAccelerator(msg.hwnd, hAccelTable, &amp;msg))\n        \/\/{\n            TranslateMessage(&amp;msg);\n            DispatchMessageW(&amp;msg);\n        \/\/}\n    }\n\n    \/\/ Cleanup\n    if (pDesktopManager)\n    {\n        pDesktopManager-&gt;Release();\n    }\n    CoUninitialize();\n\n    return (int)msg.wParam;\n}\n\nATOM MyRegisterClass(HINSTANCE hInstance)\n{\n    WNDCLASSEXW wcex = { 0 };\n\n    wcex.cbSize = sizeof(WNDCLASSEX);\n\n    wcex.style = CS_HREDRAW | CS_VREDRAW;\n    wcex.lpfnWndProc = WndProc;\n    wcex.cbClsExtra = 0;\n    wcex.cbWndExtra = 0;\n    wcex.hInstance = hInstance;\n    wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);\n    wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);\n    wcex.lpszClassName = CLASS_NAME;\n\n    return RegisterClassExW(&amp;wcex);\n}\n\nBOOL InitInstance(HINSTANCE hInstance, int nCmdShow)\n{\n    hInst = hInstance; \/\/ Store instance handle in our global variable\n\n    \/\/ \u83b7\u53d6\u7279\u5b9a\u76d1\u89c6\u5668\u7684\u4fe1\u606f\uff08\u4f8b\u5982\u7b2c\u4e00\u4e2a\u76d1\u89c6\u5668\uff09\n    HMONITOR hMonitor = MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY);\n    MONITORINFO mi = { 0 };\n    mi.cbSize = sizeof(mi);\n    if (GetMonitorInfoW(hMonitor, &amp;mi)) {\n        hWnd = CreateWindowExW(\n            WS_EX_COMPOSITED,\n            CLASS_NAME,\n            L\"Fullscreen Window\",\n            WS_POPUP,\n            mi.rcMonitor.left, mi.rcMonitor.top,\n            mi.rcMonitor.right - mi.rcMonitor.left,\n            mi.rcMonitor.bottom - mi.rcMonitor.top,\n            NULL,\n            NULL,\n            hInstance,\n            NULL\n        );\n\n        if (!hWnd)\n        {\n            return FALSE;\n        }\n\n        ShowWindow(hWnd, nCmdShow);\n        UpdateWindow(hWnd);\n\n\n        \/\/ Initialize current desktop ID\n        IsSwitchDeskOrInitWindow = true;\n        CheckDesktopSwitch();\n        IsSwitchDeskOrInitWindow = false;\n\n        Sleep(50);\n\n        \/\/ Set timer to check for desktop switches\n        timerId = SetTimer(hWnd, 1, 1000, nullptr);\n    }\n    return TRUE;\n}\n\n\/\/ Inside your CheckDesktopSwitch function:\nvoid CheckDesktopSwitch()\n{\n    GUID desktopId;\n    if (SUCCEEDED(pDesktopManager-&gt;GetWindowDesktopId(hWnd, &amp;desktopId)))\n    {\n        if (currentDesktopId != desktopId)\n        {\n            currentDesktopId = desktopId;\n\n            \/\/ Lock the mutex before showing the message box\n            if (!IsSwitchDeskOrInitWindow) {\n                IsSwitchDeskOrInitWindow = true;\n                switchDesk_mtx.lock();\n                MessageBoxW(hWnd, L\"\u7a97\u53e3\u88ab\u56fa\u5b9a\u5230\u65b0\u7684\u865a\u62df\u684c\u9762\uff01\", L\"\u901a\u77e5\", MB_OK);\n                switchDesk_mtx.unlock(); \/\/ Unlock the mutex after message box is closed\n                IsSwitchDeskOrInitWindow = false;\n            }\n        }\n    }\n}\n\n\nBOOL InitPerformanceCounter() {\n    return QueryPerformanceFrequency(&amp;PerformFrequency) &amp;&amp; QueryPerformanceCounter(&amp;StartingTime);\n}\n\nLONGLONG GetPerformanceTime() {\n\n    LARGE_INTEGER EndingTime = { 0 }, ElapsedMicroseconds = { 0 };\n\n    if (PerformFrequency.QuadPart == 0) {\n        QueryPerformanceFrequency(&amp;PerformFrequency);\n    }\n\n    \/\/ Activity to be timed\n    QueryPerformanceCounter(&amp;EndingTime);\n    ElapsedMicroseconds.QuadPart = EndingTime.QuadPart - StartingTime.QuadPart;\n\n    \/\/\n    \/\/ We now have the elapsed number of ticks, along with the\n    \/\/ number of ticks-per-second. We use these values\n    \/\/ to convert to the number of elapsed microseconds.\n    \/\/ To guard against loss-of-precision, we convert\n    \/\/ to microseconds *before* dividing by ticks-per-second.\n    \/\/\n\n    ElapsedMicroseconds.QuadPart *= 1000000;\n    ElapsedMicroseconds.QuadPart \/= PerformFrequency.QuadPart;\n\n    return ElapsedMicroseconds.QuadPart;\n}\n\nvoid AdjustWindowToMonitor()\n{\n    LONGLONG newCountTime = GetPerformanceTime();\n    if (!LastAdjustMonitorTime) {\n        LastAdjustMonitorTime = newCountTime;\n        return;\n    }\n\n    if ((newCountTime - LastAdjustMonitorTime) &gt;= 550000) {\n        LastAdjustMonitorTime = newCountTime;\n        HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);\n        MONITORINFO mi = { 0 };\n        mi.cbSize = sizeof(mi);\n        if (GetMonitorInfoW(hMonitor, &amp;mi)) {\n            SetWindowPos(hWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top,\n                mi.rcMonitor.right - mi.rcMonitor.left,\n                mi.rcMonitor.bottom - mi.rcMonitor.top,\n                SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED);\n            MessageBoxW(hWnd, L\"\u76d1\u89c6\u5668\u5206\u8fa8\u7387\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u7a97\u53e3\u5927\u5c0f\u5df2\u8c03\u6574\uff01\", L\"\u901a\u77e5\", MB_OK);\n        }\n    }\n}\n\nLRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\n{\n    switch (message)\n    {\n    case WM_DISPLAYCHANGE:\n    case WM_MOVE:\n    case WM_SIZE:\n        AdjustWindowToMonitor();\n        break;\n    case WM_TIMER:\n        if (wParam == timerId)\n        {\n            CheckDesktopSwitch();\n        }\n        break;\n    case WM_CLOSE:\n    {\n        if (IDYES == MessageBoxW(hWnd, \n            L\"\u786e\u5b9a\u8981\u5173\u95ed\u7a0b\u5e8f\u5417\uff1f\", L\"\u5173\u95ed\", \n            MB_ICONINFORMATION | \n            MB_APPLMODAL | \n            MB_YESNO)\n            ) {\n            KillTimer(hWnd, timerId);\n            PostQuitMessage(0);\n        }\n    }\n    break;\n    default:\n        return DefWindowProcW(hWnd, message, wParam, lParam);\n    }\n    return 0;\n}<\/code><\/pre>\n<p>\n   \u540c\u6b65\u76d1\u89c6\u5668\u5206\u8fa8\u7387\u66f4\u6539\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u76d1\u89c6\u5668\u5206\u8fa8\u7387\u66f4\u6539\u901a\u77e5<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u56fa\u5b9a\u684c\u9762\u53d1\u751f\u53d8\u5316\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u68c0\u6d4b\u865a\u62df\u684c\u9762\u5207\u6362\uff08\u6682\u672a\u4f7f\u7528\u672a\u6587\u6863\u5316\u7684 COM \u63a5\u53e3\uff09<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u76ee\u524d\u6b63\u5728\u7814\u7a76\u7684\u6587\u732e\u548c\u8d44\u6599\uff1a\n  <\/p>\n<ul>\n<li>\n    <a href=\"https:\/\/www.cnblogs.com\/fence\/archive\/2009\/12\/28\/1634560.html\" rel=\"nofollow\" title=\"Windows\u7cfb\u7edf\u4e0b\u7684\u591a\u663e\u793a\u5668\u6a21\u5f0f\u5f00\u53d1\u65e5\u8bb0 [\u8f6c] - \u7bf1\u7b06\u535a\u5ba2 - \u535a\u5ba2\u56ed (cnblogs.com)\"><br \/>\n     Windows\u7cfb\u7edf\u4e0b\u7684\u591a\u663e\u793a\u5668\u6a21\u5f0f\u5f00\u53d1\u65e5\u8bb0 [\u8f6c] &#8211; \u7bf1\u7b06\u535a\u5ba2 &#8211; \u535a\u5ba2\u56ed (cnblogs.com)<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/blog.sina.com.cn\/s\/blog_4078ccd60100049a.html\" rel=\"nofollow\" title=\"Windows\u7cfb\u7edf\u4e0b\u7684\u591a\u663e\u793a\u5668\u6a21\u5f0f\u5f00\u53d1\u65e5\u8bb0(\u4e00)_\u4e00\u53ea\u8001\u864e_\u65b0\u6d6a\u535a\u5ba2 (sina.com.cn)\"><br \/>\n     Windows\u7cfb\u7edf\u4e0b\u7684\u591a\u663e\u793a\u5668\u6a21\u5f0f\u5f00\u53d1\u65e5\u8bb0(\u4e00)_\u4e00\u53ea\u8001\u864e_\u65b0\u6d6a\u535a\u5ba2 (sina.com.cn)<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/blog.sina.com.cn\/s\/articlelist_1081658582_0_5.html#:~:text=21%2017%3A37-,Windows%E7%B3%BB%E7%BB%9F%E4%B8%8B%E7%9A%84%E5%A4%9A%E6%98%BE%E7%A4%BA%E5%99%A8%E6%A8%A1%E5%BC%8F%E5%BC%80%E5%8F%91%E2%80%A6,Windows%E7%B3%BB%E7%BB%9F%E4%B8%8B%E7%9A%84%E5%A4%9A%E6%98%BE%E7%A4%BA%E5%99%A8%E6%A8%A1%E5%BC%8F%E5%BC%80%E5%8F%91%E2%80%A6,-%281\/\" rel=\"nofollow\" title=\"\u535a\u6587\u65e5\u8bb0\u5217\u8868_\u4e00\u53ea\u8001\u864e_\u65b0\u6d6a\u535a\u5ba2\"><br \/>\n     \u535a\u6587\u65e5\u8bb0\u5217\u8868_\u4e00\u53ea\u8001\u864e_\u65b0\u6d6a\u535a\u5ba2<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/eizo.com.cn\/global\/library\/basics\/windows-10-multi-display-function\/index.html\" rel=\"nofollow\" title='\u5728Windows 10\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u65b9\u4fbf\u7684\"\u591a\u663e\u793a\u5668\"\u529f\u80fd (eizo.com.cn)'><br \/>\n     \u5728Windows 10\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u65b9\u4fbf\u7684&#8221;\u591a\u663e\u793a\u5668&#8221;\u529f\u80fd (eizo.com.cn)<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/blog.csdn.net\/2301_77171572\/article\/details\/136927587\" title=\"C++\u68c0\u6d4b\u591a\u663e\u793a\u5668\u5e76\u628a\u7a97\u53e3\u663e\u793a\u5728\u4e0d\u540c\u663e\u793a\u5668\u4e0a\uff08\u5b8c\u6574\u6e90\u7801\uff09- CSDN\u535a\u5ba2\"><br \/>\n     C++\u68c0\u6d4b\u591a\u663e\u793a\u5668\u5e76\u628a\u7a97\u53e3\u663e\u793a\u5728\u4e0d\u540c\u663e\u793a\u5668\u4e0a\uff08\u5b8c\u6574\u6e90\u7801\uff09- CSDN\u535a\u5ba2<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/www.cnblogs.com\/zyfd\/p\/9590462.html\" rel=\"nofollow\" title=\"Windows\u6269\u5c55\u5c4f\u5f00\u53d1\u603b\u7ed3 - tianshidan1998 - \u535a\u5ba2\u56ed (cnblogs.com)\"><br \/>\n     Windows\u6269\u5c55\u5c4f\u5f00\u53d1\u603b\u7ed3 &#8211; tianshidan1998 &#8211; \u535a\u5ba2\u56ed (cnblogs.com)<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/bbs.csdn.net\/topics\/390255572\" title=\"\u5b50\u7a97\u53e3\u968f\u7236\u7a97\u53e3\u5927\u5c0f\u6539\u53d8\u95ee\u9898\u3002-CSDN\u793e\u533a\"><br \/>\n     \u5b50\u7a97\u53e3\u968f\u7236\u7a97\u53e3\u5927\u5c0f\u6539\u53d8\u95ee\u9898\u3002-CSDN\u793e\u533a<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/bbs.csdn.net\/topics\/390283165\" title=\"\u6c42\u52a9\uff0c\u5b50\u7a97\u53e3\u600e\u4e48\u77e5\u9053\u7236\u7a97\u53e3\u5927\u5c0f\u53d1\u751f\u53d8\u5316-CSDN\u793e\u533a\"><br \/>\n     \u6c42\u52a9\uff0c\u5b50\u7a97\u53e3\u600e\u4e48\u77e5\u9053\u7236\u7a97\u53e3\u5927\u5c0f\u53d1\u751f\u53d8\u5316-CSDN\u793e\u533a<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/github.com\/mzomparelli\/GetVirtualDesktopAPI_DIA\" title=\"GetVirtualDesktopAPI_DIA: Automatically retrive VirtualDesktop API's GUID &amp; Com Interface.\"><br \/>\n     GetVirtualDesktopAPI_DIA: Automatically retrive VirtualDesktop API&#8217;s GUID &amp; Com Interface.<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/github.com\/Slion\/VirtualDesktop\" title=\"VirtualDesktop: C# wrapper for the Virtual Desktop API on Windows 11.\"><br \/>\n     VirtualDesktop: C# wrapper for the Virtual Desktop API on Windows 11.<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/github.com\/Grabacr07\/VirtualDesktop\/pull\/79\" title=\"Fixing crash on Windows &gt; 22000 Pull Request #79 \u00b7 Grabacr07\/VirtualDesktop\"><br \/>\n     Fixing crash on Windows &gt; 22000 Pull Request #79 \u00b7 Grabacr07\/VirtualDesktop<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/github.com\/mntone\/VirtualDesktop\/pull\/1#issuecomment-950427131\" title=\"Add support for 22449 &amp; correct nami \u00b7 Pull Request #1 \u00b7 mntone\/VirtualDesktop\"><br \/>\n     Add support for 22449 &amp; correct nami \u00b7 Pull Request #1 \u00b7 mntone\/VirtualDesktop<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/github.com\/Slion\/VirtualDesktop\/issues\/1\" title=\"Support OS Build 22621.2215 \u00b7 Issue #1 \u00b7 Slion\/VirtualDesktop\"><br \/>\n     Support OS Build 22621.2215 \u00b7 Issue #1 \u00b7 Slion\/VirtualDesktop<br \/>\n    <\/a>\n   <\/li>\n<\/ul>\n<p>\n   \u8fd9\u4e9b\u8d44\u6599\u548c\u6269\u5c55\u663e\u793a\u5668\uff08\u66f4\u65e9\uff09\u548c\u865a\u62df\u591a\u684c\u9762\uff08Win10\/11\uff09\u6709\u5173\u3002\n  <\/p>\n<hr\/>\n<p>\n   <strong><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \uff08\u6ce8\u610f\uff0c\u4ee5\u4e0b\u6c34\u5e73\u7ebf\u5185\u7684\u6280\u672f\u7ec6\u8282\u53ef\u80fd\u7528\u4e0d\u5230\uff1a\uff09<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    <s><br \/>\n     \u4e00\u5f00\u59cb\u6211\u4ee5\u4e3a\u662f\u7a97\u53e3\u5904\u7406\u7684\u5927\u5c0f\u4fee\u6539\u6d88\u606f\uff0c\u7136\u540e\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff0c\u4e00\u79cd\u662f\u5728\u8c03\u7528 SetParent \u524d\u8c03\u7528 SetWindowPlacement \u51fd\u6570\u4fee\u6539\u7a97\u53e3\u8fd8\u539f\u72b6\u6001\u7684\u5386\u53f2\u8bb0\u5f55\uff0c\u53e6\u4e00\u79cd\u5219\u662f\u5728\u8c03\u7528\u540e\u4f7f\u7528 SetWindowPos \u51fd\u6570\u76f4\u63a5\u4fee\u6539\u7a97\u53e3\u5927\u5c0f\u3002<br \/>\n    <\/s><br \/>\n    \u4f46\u662f\u5b9e\u9645\u7ed3\u679c\u662f\u7a97\u53e3\u5e76\u6ca1\u6709\u63a5\u53d7\u5230\u6d88\u606f\u3002\u8fd9\u91cc\u7a97\u53e3\u5927\u5c0f\u6539\u53d8\u4e3b\u8981\u662f\u7531\u4e8e\u7a97\u53e3\u7684 DPI \u7f29\u653e\u4e0d\u540c\u5bfc\u81f4\u7684\uff0c\u53ea\u9700\u8981\u5728 SetParent \u524d\u5c06 DPI \u8bbe\u7f6e\u4e3a\u76f8\u540c\u7684\u5373\u53ef\u3002\u5982\u679c\u4f60\u8fd8\u4e0d\u653e\u5fc3\uff0c\u5c31\u8bbe\u7f6e\u8ba1\u65f6\u5668\u6216\u8005\u6d88\u606f\u673a\u5236\u6765\u68c0\u67e5\u7a97\u53e3\u5927\u5c0f\uff0c\u5e76\u5728\u88ab\u4fee\u6539\u65f6\u5019\u6062\u590d\u539f\u59cb\u5927\u5c0f\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u8fd9\u91cc\u4ee5\u5728\u8c03\u7528\u540e\u76f4\u63a5\u4fee\u6539\u4e3a\u4f8b\uff1a<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u57fa\u672c\u7528\u6cd5\uff1a<br \/>\n   <\/span>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     int scWidth, scHeight;<br \/>\n     <br \/>\n     \/\/ \u83b7\u53d6\u5c4f\u5e55\u5bbd\u9ad8<br \/>\n     <br \/>\n     scWidth = GetSystemMetrics(SM_CXSCREEN);<br \/>\n     <br \/>\n     scHeight = GetSystemMetrics(SM_CYSCREEN);<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     \/\/ \u8bbe\u7f6e\u6700\u5927\u5316<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     ShowWindow(hClientWnd, SW_SHOWMAXIMIZED);<br \/>\n     <br \/>\n     SetWindowPos(hClientWnd,NULL, 0, 0, scWidth, scHeight, SWP_NOZORDER | SWP_FRAMECHANGED);<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u6837\u4f8b\u51fd\u6570\u4ee3\u7801\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">BOOL SetDynamicDesktopWindow(DesktopWndInfoPtr lpWndInfo)\n{\n    if (lpWndInfo == NULL)\n        return FALSE;\n\n    RECT rc = { 0,0,0,0 };\n    LONG style = 0,\n         SWLRetn = 0;\n    HWND\n         hClientWnd = (*lpWndInfo).WallpaperWnd,\n         hWorkerW = (*lpWndInfo).Workerw2,\n         hProgman = (*lpWndInfo).Progman;\n    HWND LastParent = NULL;\n    DWORD nSPerror = 0;\n    int Version = (*lpWndInfo).OSVersion;\n    int scWidth, scHeight, perx, pery;\n    int ctWidth, ctHeight;\n    \/\/\u83b7\u53d6\u5c4f\u5e55\u5bbd\u9ad8\n    scWidth = GetSystemMetrics(SM_CXSCREEN);\n    scHeight = GetSystemMetrics(SM_CYSCREEN);\n\n    \/\/ \u540c\u6b65\u7a97\u53e3\u7684\u98ce\u683c\uff0c\u5426\u5219SetParent()\u5c06\u51fa\u73b0\u610f\u6599\u4e4b\u5916\u7684\u7ed3\u679c\u3002\n    style = GetWindowLongW(hClientWnd, GWL_STYLE);\n    style &amp;= ~WS_POPUP &amp; ~WS_CAPTION &amp; ~WS_SIZEBOX;\n    style |= WS_CHILD;\n    SWLRetn = \n        SetWindowLongW(hClientWnd, GWL_STYLE, style);\n\n    if (SWLRetn == 0)\n    {\n        printf(\"[-] FatalError: SetWindowLong Error!err_code[ %d ]\\n\", \n            GetLastError());\n        return FALSE;\n    }\n\n\n    \/\/ \u8bbe\u7f6e\u7236\u7a97\u53e3\n    if (Version == 2) \/\/ Win 7 \/ Win 8\n    {\n        ShowWindow(hWorkerW, SW_HIDE);\n        SetLastError(0);\n        LastParent = SetParent(hClientWnd, hProgman);\n    }\n    else {\/\/ \u9ad8\u7248\u672c\n        SetLastError(0);\n        LastParent = SetParent(hClientWnd, hWorkerW);\n    }\n\n    nSPerror = GetLastError();\n    if (nSPerror &gt; 0 || LastParent == NULL)\n    {\n        printf(\"[-] FatalError: SetParent Error!err_code[ %d ]\\n \\n\", nSPerror);\n        return FALSE;\n    }\n    \n    \n    \/\/ \u786e\u4fdd\u52a8\u6001\u58c1\u7eb8\u4e3b\u7a97\u53e3\u662f\u5168\u5c4f\u7684\n    ShowWindow(hClientWnd, SW_SHOWMAXIMIZED);\n    SetWindowPos(hClientWnd,\n        NULL, 0, 0, scWidth, scHeight, SWP_NOZORDER | SWP_FRAMECHANGED);\n    \n    GetWindowRect(hClientWnd, &amp;rc);\n    ctWidth = rc.right - rc.left;\n    ctHeight = rc.bottom - rc.top;\n\n    if (ctWidth != scWidth || ctHeight != scHeight)\n    {\n        printf(\"[-] SetWindowPos failed.\\n \\n\");\n        return FALSE;\n    }\n    printf(\"[+] SetWindowPos Success.\\n \\n\");\n    printf(\"[+] SetWallpeperWindow Successfully!\\n\");\n    return TRUE;\n}<\/code><\/pre>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u4f46\u662f\uff0c\u91cd\u65b0\u7f16\u8bd1\u540e\u8fd0\u884c\u7684\u6548\u679c\u5374\u4e0d\u5982\u610f\uff1a<br \/>\n   <\/span>\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u6211\u4eec\u53d1\u73b0\uff0c\u5728 Win 11 \u7cfb\u7edf\u4e0a\u7a97\u53e3\u4f9d\u7136\u65e0\u6cd5\u5168\u5c4f\u663e\u793a\uff0c\u6211\u4eec\u9996\u5148\u68c0\u67e5\u58c1\u7eb8\u7a97\u53e3\u7684\u77e9\u5f62\uff0c\u4e0b\u56fe\u662f\u4f7f\u7528 GetSystemMetrics \u51fd\u6570\u83b7\u53d6\u7684\u5c4f\u5e55\u77e9\u5f62\uff0c\u83b7\u53d6\u5230\u7684\u77e9\u5f62\u6570\u636e\u4e3a 960<br \/>\n    1707\uff1a<br \/>\n   <\/span>\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u6211\u4eec\u6253\u5f00\u7cfb\u7edf\u8bbe\u7f6e\uff0c\u627e\u5230\u5c4f\u5e55\u5206\u8fa8\u7387\uff0c\u5728\u6211\u673a\u5668\u4e0a\u662f 2560<br \/>\n    1440\uff0c\u7f29\u653e\u6bd4\u4f8b\uff08DPI \u56e0\u5b50\uff09\u662f 1.5\uff1a<br \/>\n   <\/span>\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u4e0d\u96be\u53d1\u73b0\u5982\u4e0b\u8f6c\u6362\u516c\u5f0f\uff1a<br \/>\n   <\/span>\n  <\/p>\n<p style=\"text-align:center\">\n   <span style=\"color:#7b7f82\"><br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u90a3\u4e48\uff0c\u6211\u4eec\u5982\u4f55\u83b7\u53d6\u5f53\u524d\u663e\u793a\u5668\u7684\u7f29\u653e\u6bd4\u4f8b\u5462\uff1f<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u7b56\u7565\uff1a\u901a\u8fc7 DWM API \u51fd\u6570\u00a0DwmGetWindowAttribute<br \/>\n   <\/span>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     HRESULT DwmGetWindowAttribute(<br \/>\n     <br \/>\n     HWND \u00a0hwnd,<br \/>\n     <br \/>\n     DWORD dwAttribute,<br \/>\n     <br \/>\n     [out] PVOID pvAttribute,<br \/>\n     <br \/>\n     DWORD cbAttribute<br \/>\n     <br \/>\n     );<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     \u3010\u53c2\u6570\u3011<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     <code><br \/>\n      1. hwnd<br \/>\n     <\/code><br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     \u8981\u4ece\u4e2d\u68c0\u7d22\u5c5e\u6027\u503c\u7684\u7a97\u53e3\u7684\u53e5\u67c4\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     <code><br \/>\n      2. dwAttribute<br \/>\n     <\/code><br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     \u63cf\u8ff0\u8981\u68c0\u7d22\u7684\u503c\u7684\u6807\u5fd7\uff0c\u6307\u5b9a\u4e3a<br \/>\n     <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/dwmapi\/ne-dwmapi-dwmwindowattribute\" rel=\"nofollow\" title=\"DWMWINDOWATTRIBUTE\"><br \/>\n      DWMWINDOWATTRIBUTE<br \/>\n     <\/a><br \/>\n     \u679a\u4e3e\u7684\u503c\u3002 \u6b64\u53c2\u6570\u6307\u5b9a\u8981\u68c0\u7d22\u7684\u5c5e\u6027\uff0c<br \/>\n     <em><br \/>\n      pvAttribute<br \/>\n     <\/em><br \/>\n     \u53c2\u6570\u6307\u5411\u5728\u5176\u4e2d\u68c0\u7d22\u5c5e\u6027\u503c\u7684\u5bf9\u8c61\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     <code><br \/>\n      3. [out] pvAttribute<br \/>\n     <\/code><br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     \u6307\u5411\u503c\u7684\u6307\u9488\uff0c\u5f53\u6b64\u51fd\u6570\u6210\u529f\u8fd4\u56de\u65f6\uff0c\u8be5\u503c\u63a5\u6536\u7279\u6027\u7684\u5f53\u524d\u503c\u3002 \u68c0\u7d22\u5230\u7684\u503c\u7684\u7c7b\u578b\u53d6\u51b3\u4e8e<br \/>\n     <em><br \/>\n      dwAttribute<br \/>\n     <\/em><br \/>\n     \u53c2\u6570\u7684\u503c\u3002<br \/>\n     <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/Dwmapi\/ne-dwmapi-dwmwindowattribute\" rel=\"nofollow\" title=\"DWMWINDOWATTRIBUTE\"><br \/>\n      DWMWINDOWATTRIBUTE<br \/>\n     <\/a><br \/>\n     \u679a\u4e3e\u4e3b\u9898\u5728\u6bcf\u4e2a\u6807\u5fd7\u7684\u884c\u4e2d\u6307\u793a\u5e94\u5728<br \/>\n     <em><br \/>\n      pvAttribute<br \/>\n     <\/em><br \/>\n     \u53c2\u6570\u4e2d\u5c06\u6307\u9488\u4f20\u9012\u7ed9\u7684\u503c\u7684\u7c7b\u578b\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     <code><br \/>\n      4. cbAttribute<br \/>\n     <\/code><br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#7b7f82\"><br \/>\n     \u901a\u8fc7<br \/>\n     <em><br \/>\n      pvAttribute<br \/>\n     <\/em><br \/>\n     \u53c2\u6570\u63a5\u6536\u7684\u5c5e\u6027\u503c\u7684\u5927\u5c0f\uff08\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff09\u3002 \u68c0\u7d22\u5230\u7684\u503c\u7684\u7c7b\u578b\u53ca\u5176\u5927\u5c0f\uff08\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff09\u53d6\u51b3\u4e8e<br \/>\n     <em><br \/>\n      dwAttribute<br \/>\n     <\/em><br \/>\n     \u53c2\u6570\u7684\u503c\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    DWMWINDOWATTRIBUTE \u4e2d\u5982\u679c\u6307\u5b9a\u00a0DWMWA_EXTENDED_FRAME_BOUNDS<br \/>\n    <code><br \/>\n    <\/code><br \/>\n    \u4e0e<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/dwmapi\/nf-dwmapi-dwmgetwindowattribute\" rel=\"nofollow\" title=\"DwmGetWindowAttribute\"><br \/>\n     DwmGetWindowAttribute<br \/>\n    <\/a><br \/>\n    \u4e00\u8d77\u4f7f\u7528\u3002 \u51fd\u6570\u5c06\u68c0\u7d22\u5c4f\u5e55\u7a7a\u95f4\u4e2d\u7684\u6269\u5c55\u6846\u67b6\u8fb9\u754c\u77e9\u5f62\u3002 \u68c0\u7d22\u5230\u7684\u503c\u7684\u7c7b\u578b\u4e3a<br \/>\n    <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/desktop\/api\/windef\/ns-windef-rect\" rel=\"nofollow\" title=\"RECT\"><br \/>\n     RECT<br \/>\n    <\/a><br \/>\n    \u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u6839\u636e\u8fd9\u4e2a\u51fd\u6570\u4ee5\u53ca GetWindowRect \u53ef\u4ee5\u8ba1\u7b97\u51fa\u7f29\u653e\u6bd4\u4f8b\uff0c\u4e0d\u8fc7\u7ebf\u7a0b\u7684 DPI \u8bbe\u7f6e\u5fc5\u987b\u662f\u65e0\u611f\u77e5\u7684\uff0c\u5426\u5219\u8c03\u7528\u51fd\u6570\u8fd4\u56de\u503c\u4e3a 0\uff0c\u4e5f\u5c31\u65e0\u6cd5\u8ba1\u7b97\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">RECT r1 = { 0 };\nRECT r2 = { 0 };\ndouble vScale = 0, hScale = 0;\nDWORD cbyte = sizeof(r2);\n\n\/\/ \u83b7\u53d6\u4e0d\u5305\u542b DPI \u7f29\u653e\u7684\u6570\u503c\nGetWindowRect(hWnd, &amp;r1);\ndouble width1 = r1.right - r1.left;\ndouble height1 = r1.bottom - r1.top;\n\n\/\/ \u83b7\u53d6 DPI \u4e0b\u6269\u5c55\u77e9\u5f62\uff08\u7a97\u53e3\u5fc5\u987b\u53ef\u89c1\uff0c\u4e14\u8c03\u7528\u65b9\u7ebf\u7a0b DPI \u662f\u65e0\u611f\u77e5\u6a21\u5f0f\uff09\nDwmGetWindowAttribute(hWnd, DWMWA_EXTENDED_FRAME_BOUNDS, &amp;r2, cbyte);\ndouble width2 = r2.right - r2.left;\ndouble height2 = r2.bottom - r2.top;\n\n\/\/ \u8ba1\u7b97 DPI \u56e0\u5b50\nhScale = width2 \/ width1;\nhScale = height2 \/ height1;\n\n\/\/ \u8f93\u51fa\u7ed3\u679c\nprintf(\"DPI Value: \\n  horzScale: [%lf]\\n  vertScale: [%lf]\\n\"\n        , horzScale, vertScale);<\/code><\/pre>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u4ee5\u4e0a\u6d4b\u8bd5\u7684\u5b8c\u6574\u4ee3\u7801\uff1a<br \/>\n   <\/span>\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;iostream&gt;\n#include &lt;windows.h&gt;\n#include &lt;winuser.h&gt;\n#include &lt;dwmapi.h&gt;\n#include &lt;ShellScalingApi.h&gt;\t\t\/\/ \u5f15\u7528\u5934\u6587\u4ef6\n#pragma comment(lib, \"Shcore.lib\")\t\/\/ \u94fe\u63a5\u5e93\u6587\u4ef6\n#pragma comment(lib, \"dwmapi.lib\")\n\nint main()\n{\n    \/\/ \u83b7\u53d6\u7a97\u53e3\u5f53\u524d\u663e\u793a\u7684\u76d1\u89c6\u5668\n    printf(\"\\n\\nGetMonitorInfo: \\n\\n\");\n    HWND hWnd = GetDesktopWindow();\/\/\u6839\u636e\u9700\u8981\u53ef\u4ee5\u66ff\u6362\u6210\u81ea\u5df1\u7a0b\u5e8f\u7684\u53e5\u67c4 \n    HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);\n\n    \/\/ \u83b7\u53d6\u76d1\u89c6\u5668\u903b\u8f91\u5bbd\u5ea6\u4e0e\u9ad8\u5ea6\n    MONITORINFOEX miex{};\n    miex.cbSize = sizeof(miex);\n    GetMonitorInfoW(hMonitor, &amp;miex);\n    int cxLogical = (miex.rcMonitor.right - miex.rcMonitor.left);\n    int cyLogical = (miex.rcMonitor.bottom - miex.rcMonitor.top);\n\n    \/\/ \u83b7\u53d6\u76d1\u89c6\u5668\u7269\u7406\u5bbd\u5ea6\u4e0e\u9ad8\u5ea6\n    DEVMODE dm;\n    dm.dmSize = sizeof(dm);\n    dm.dmDriverExtra = 0;\n    EnumDisplaySettingsW(miex.szDevice, ENUM_CURRENT_SETTINGS, &amp;dm);\n    int cxPhysical = dm.dmPelsWidth;\n    int cyPhysical = dm.dmPelsHeight;\n\n    \/\/ \u7f29\u653e\u6bd4\u4f8b\u8ba1\u7b97\n    double horzScale = ((double)cxPhysical \/ (double)cxLogical);\n    double vertScale = ((double)cyPhysical \/ (double)cyLogical);\n\n    \/\/ \u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6570\u53d6\u5c0f\u6570\u4f4d,\u8f6c\u6362\u4e3a\u767e\u5206\u5236\u6570\u503c\n    \/\/ \u5148\u5c0f\u6570\u6709\u6548\u4f4d\u4f4d\u56db\u820d\u4e94\u5165\u8fdb\u4f4d\u5230\u4e2a\u4f4d\u524d\uff0c\u7136\u540eint\u622a\u65ad\u53d6\u6574\n    int i_hScale = (int)((horzScale) * 100 + 0.5);\n    double m_hScale = i_hScale \/ 100.0;\/\/ \u767e\u5206\u5236\u8f6c\u6362\u4e3a\u6709\u6548\u5c0f\u6570\u4f4d\n    int i_vScale = (int)((vertScale) * 100.0 + 0.5);\n    double m_vScale = i_vScale \/ 100.0;\n    printf(\"DPI ExactValue:\\n  horzScale: [%lf]\\n  vertScale: [%lf]\\n\\n\"\n        ,horzScale, vertScale);\n    printf(\"DPI SysSetValue:\\n  horzScale(percent): %d\\n  vertScale(percent): %d\\n\\n\"\n        ,i_hScale, i_vScale);\n\n    \/\/ ----------------------------------------------\/\/\n    printf(\"\\n\\nDwmGetWindowAttribute: \\n\\n\");\n    RECT r1 = { 0 };\n    RECT r2 = { 0 };\n    DWORD cbyte = sizeof(r2);\n    double vScale = 0, hScale = 0;\n    GetWindowRect(hWnd, &amp;r1);\n    double width1 = r1.right - r1.left;\n    double height1 = r1.bottom - r1.top;\n\n    \n    DwmGetWindowAttribute(hWnd, DWMWA_EXTENDED_FRAME_BOUNDS, &amp;r2, cbyte);\n    double width2 = r2.right - r2.left;\n    double height2 = r2.bottom - r2.top;\n\n    \n    hScale = width2 \/ width1;\n    hScale = height2 \/ height1;\n\n    printf(\"DPI Value: \\n  horzScale: [%lf]\\n  vertScale: [%lf]\\n\"\n        , horzScale, vertScale);\n\n    system(\"pause\");\n    return 0;\n}\n\n<\/code><\/pre>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u7a0b\u5e8f\u6267\u884c\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<br \/>\n   <\/span>\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u6210\u529f\u83b7\u53d6\u5230 DPI \u7f29\u653e\u56e0\u5b50\u3002\u6839\u636e\u7f29\u653e\u56e0\u5b50\u53ef\u4ee5\u8ba1\u7b97\u6211\u4eec\u7a97\u53e3\u9700\u8981\u7684\u5927\u5c0f\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   <span style=\"color:#7b7f82\"><br \/>\n    \u4f46\u662f\u5728\u5b9e\u8df5\u4e2d\uff0c\u53d1\u73b0\u8fd9\u6837\u5b50\u7684\u65b9\u6cd5\u6bd4\u8f83\u9ebb\u70e6\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u63a7\u4ef6\u7a97\u53e3\u90fd\u8981\u91cd\u65b0\u8ba1\u7b97\u5927\u5c0f\uff0c\u5e76\u4e14 DPI\u53d1\u751f\u53d8\u5316\u65f6\u5019\u4e0d\u80fd\u53ca\u65f6\u54cd\u5e94\u3002<br \/>\n   <\/span>\n  <\/p>\n<hr\/>\n<p>\n   <strong><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \uff08\u6709\u6548\uff09<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u5fae\u8f6f\u63d0\u4f9b\u4e86\u4e00\u5957 API \u7528\u4e8e\u4fee\u6539 \u6267\u884c\u8fdb\u7a0b\/\u7ebf\u7a0b\u7684 DPI \u611f\u77e5\u6a21\u5f0f\u3002\n  <\/p>\n<p>\n   SetProcessDpiAwarenessContext\u3001SetProcessDpiAwareness\u3001SetProcessDPIAware\u3001SetThreadDpiAwarenessContext\u3001SetThreadDpiHostingBehavior\u3001GetThreadDpiAwarenessContext\u3001GetProcessDpiAwarenessContext\u3001GetWindowDpiAwarenessContext\u3001GetProcessDpiAwareness\u3002\n  <\/p>\n<p>\n   \u4f46\u662f\u5728\u5b9e\u9645\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\u53d1\u73b0\uff0c\u8fd9\u4e9b\u51fd\u6570\u4f1a\u5bfc\u81f4\u610f\u5916\u7684\u884c\u4e3a\uff0c\u5e76\u4e14\u9002\u7528\u7684\u7248\u672c\u53d7\u7cfb\u7edf\u548c\u7f16\u8bd1\u5668\u7248\u672c\u5f71\u54cd\u8f83\u4e3a\u4e25\u91cd\uff0c\u6bd4\u5982\u6700\u5178\u578b\u7684\u5f00\u542f\u4e86\u8fdb\u7a0b\u7684\u76d1\u89c6\u5668 DPI \u611f\u77e5\uff0c\u5728 Win 10 \u548c Win 11 \u4e0a\u57fa\u672c\u4e0d\u4f1a\u51fa\u73b0\u5dee\u9519\uff0c\u4f46\u662f\u5728 Win 8 \u4e0a\u5374\u6ca1\u6709\u5b9e\u73b0\u6b63\u786e\u7684\u83b7\u53d6\u7a97\u53e3\u7f29\u653e\u77e9\u5f62\u3002\u53e6\u5916\u4e00\u70b9\u5c31\u662f\u8fd9\u4e9b\u51fd\u6570\u6709\u4e9b\u53ea\u80fd\u5728 Win 8.1 \u4ee5\u4e0a\u8c03\u7528\uff0c\u800c\u5728\u66f4\u65e9\u7684\u7cfb\u7edf\u4e2d\u5374\u6ca1\u6709\u3002\u6211\u662f\u6211\u8feb\u5207\u7684\u9700\u8981\u4e00\u4e2a\u80fd\u591f\u7b80\u5316\u8fd9\u4e9b\u64cd\u4f5c\u7684\u65b9\u6cd5\u3002\n  <\/p>\n<p>\n   \u7136\u540e\uff0c\u5728\u67e5\u9605 MSDN \u65f6\u5019\u6211\u770b\u5230\u4e86\u8fd9\u4e00\u53e5\u8b66\u544a\uff0c\u7ed9\u4e86\u6211\u5f88\u5927\u5e2e\u52a9\uff1a\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5efa\u8bae\u901a\u8fc7\u5e94\u7528\u7a0b\u5e8f\u6e05\u5355\uff08\u800c\u4e0d\u662f API \u8c03\u7528\uff09\u8bbe\u7f6e\u8fdb\u7a0b\u9ed8\u8ba4 DPI \u611f\u77e5\u3002 \u6709\u5173\u8be6\u7ec6\u4fe1\u606f<br \/>\n     <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/win32\/hidpi\/setting-the-default-dpi-awareness-for-a-process\" rel=\"nofollow\" title=\"\uff0c\u8bf7\u53c2\u9605\u8bbe\u7f6e\u8fdb\u7a0b\u7684\u9ed8\u8ba4 DPI \u611f\u77e5\"><br \/>\n      \uff0c\u8bf7\u53c2\u9605\u8bbe\u7f6e\u8fdb\u7a0b\u7684\u9ed8\u8ba4 DPI \u611f\u77e5<br \/>\n     <\/a><br \/>\n     \u3002 \u901a\u8fc7 API \u8c03\u7528\u8bbe\u7f6e\u8fdb\u7a0b\u9ed8\u8ba4 DPI \u611f\u77e5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u610f\u5916\u7684\u5e94\u7528\u7a0b\u5e8f\u884c\u4e3a\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u6839\u636e\u63d0\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u7684\u5c5e\u6027\u9875\u9762\u4e2d\u627e\u5230\uff1a\u5728 \u9879\u76ee\u5c5e\u6027-&gt;\u6e05\u5355\u5de5\u5177-&gt;\u8f93\u5165\u548c\u8f93\u51fa-&gt;DPI \u8bc6\u522b\u529f\u80fd\u4e2d\uff0c\u5c06\u5c5e\u6027\u6539\u4e3a<br \/>\n   <strong><br \/>\n    \u6bcf\u4e2a\u663e\u793a\u5668\u9ad8DPI\u8bc6\u522b<br \/>\n   <\/strong><br \/>\n   \u5373\u53ef\u3002\u5c06\u4efb\u52a1\u4ea4\u7ed9\u7f16\u8bd1\u5668\uff0c\u4ed6\u4f1a\u4e3a\u6211\u4eec\u6dfb\u52a0\u5408\u9002\u7684\u4ee3\u7801\u3002<br \/>\n   \n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u518d\u6b21\u7f16\u8bd1\uff0c\u5b8c\u7f8e\u83b7\u53d6\u5230\u6b63\u786e\u7684\u6570\u503c\u3002\u4f46\u662f\uff0c\u5176\u5b9e\u8fd8\u6709\u95ee\u9898\uff0cWin8 \u597d\u50cf\u4f9d\u7136\u65e0\u6548\uff0c\u539f\u56e0\u602a\u5fae\u8f6f\u4ee5\u524d\u7684\u63a5\u53e3\u548c\u73b0\u5728\u4e0d\u4e00\u6837\uff0c\u6709 V1\u3001V2 \u548c V3\u3002\u6b64\u65f6\uff0c\u6700\u4f73\u7684\u65b9\u6cd5\u5c31\u662f\u7528\u7a0b\u5e8f\u6e05\u5355\u6765\u5904\u7406\u4e0d\u540c\u7cfb\u7edf\u60c5\u51b5\u3002\n  <\/p>\n<p>\n   \u4f7f\u7528\u4e0b\u9762\u6e05\u5355\u6587\u4ef6\uff0c\u53ef\u4ee5\u5f7b\u5e95\u89e3\u51b3\u8be5\u95ee\u9898\u3002\n  <\/p>\n<pre><code class=\"language-XML\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&gt;\n&lt;assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\" xmlns:asmv3=\"urn:schemas-microsoft-com:asm.v3\"&gt;\n  &lt;asmv3:application&gt;\n    &lt;asmv3:windowsSettings&gt;\n      &lt;dpiAware xmlns=\"http:\/\/schemas.microsoft.com\/SMI\/2005\/WindowsSettings\"&gt;true&lt;\/dpiAware&gt;\n      &lt;dpiAwareness xmlns=\"http:\/\/schemas.microsoft.com\/SMI\/2016\/WindowsSettings\"&gt;PerMonitorV2&lt;\/dpiAwareness&gt;\n    &lt;\/asmv3:windowsSettings&gt;\n  &lt;\/asmv3:application&gt;\n&lt;\/assembly&gt;<\/code><\/pre>\n<hr\/>\n<p>\n   \uff08<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    Patch\uff1a\u6b64\u5904\u7684\u52a8\u753b\u9700\u8981\u91cd\u5199\u6216\u5220\u9664\uff0c\u4f8b\u5982\u53ef\u4ee5\u6539\u4e3a\u5d4c\u5165\u7a97\u53e3\u4e4b\u540e\u518d\u663e\u793a\u51fa\u6765<br \/>\n   <\/span><br \/>\n   \uff09\u63a5\u7740\uff0c\u4e3a\u4e86\u907f\u514d\u8bbe\u7f6e\u7236\u7a97\u53e3\u4ea7\u751f\u7684<br \/>\n   <strong><br \/>\n    \u7a81\u5140\u611f<br \/>\n   <\/strong><br \/>\n   \uff0c\u901a\u8fc7<br \/>\n   <strong><br \/>\n    \u6298\u53e0\u5c55\u5f00\u7684\u6548\u679c<br \/>\n   <\/strong><br \/>\n   \uff0c\u6cbf\u5bf9\u89d2\u7ebf\u6269\u5c55\u7a97\u53e3\u77e9\u5f62\uff0c\u53ef\u4ee5\u4ea7\u751f\u8f83\u4e3a\u8212\u9002\u7684\u89c6\u89c9\u6548\u679c\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">\/\/ \u8ba1\u7b97\u589e\u91cf\nint perx = scWidth \/ 10;\nint pery = scHeight \/ 10;\n\n\/\/ \u5faa\u73af\u8bbe\u7f6e\u5927\u5c0f\nfor (int i = 0; i &lt;= 10; i++)\n{\n    \/\/SetWindowPos(hClientWnd,\n    \/\/    NULL, 0, 0, perx, pery, SWP_FRAMECHANGED);\n    \/\/ \u8865\u4e01\uff1a2024.06.16\n    SetWindowPos(hClientWnd,\n        NULL, 0, 0, perx, pery, SWP_NOZORDER | SWP_FRAMECHANGED);\n    perx += perx;\n    pery += pery;\n    Sleep(35); \/\/ \u5ef6\u8fdf\u4ea7\u751f\u89c6\u89c9\u6682\u7559\n}<\/code><\/pre>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      06.16 \u4fee\u6b63\u53c2\u6570\u9519\u8bef\uff1a<br \/>\n     <\/strong><br \/>\n     \u8c03\u7528\u00a0SetWindowPos \u65f6\uff0c\u82e5\u4e0d\u9700\u8981\u66f4\u6539 Z \u5e8f\uff0c\u5219\u8981\u6307\u5b9a SWP_NOZORDER \u53c2\u6570\u3002\u4e0d\u7136\u7b2c\u4e8c\u4e2a\u53c2\u6570\u00a0hWndlnsertAfter \u4e3a 0 \u65f6\uff0c\u5c06\u88ab\u89e3\u91ca\u4e3a HWND_TOP((HWND)0) \u800c\u5bfc\u81f4\u5185\u90e8\u5c1d\u8bd5\u66f4\u6539 Z \u5e8f\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u8be6\u89c1\uff1a<br \/>\n    <\/span><br \/>\n    <a href=\"https:\/\/bbs.csdn.net\/topics\/390844480\" title=\"https:\/\/bbs.csdn.net\/topics\/390844480\"><br \/>\n     https:\/\/bbs.csdn.net\/topics\/390844480<br \/>\n    <\/a><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u6700\u540e\uff0c\u901a\u8fc7 GetWindowRect \u68c0\u67e5\u7a97\u53e3\u5927\u5c0f\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">GetWindowRect(hClientWnd, &amp;rc);\nint ctWidth = rc.right - rc.left;\nint ctHeight = rc.bottom - rc.top;\n\nif (ctWidth != scWidth || ctHeight != scHeight)\n{\n    printf(\"[-] SetWindowPos failed.\\n \\n\");\n    return FALSE;\n}<\/code><\/pre>\n<h4 id=\"2.3%20%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E5%B9%B6%E5%88%A4%E6%96%AD%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%EF%BC%88%E6%9C%AA%E6%9D%A5%E5%8F%AF%E8%83%BD%E6%9B%B4%E6%94%B9%EF%BC%89\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.3 \u5982\u4f55\u83b7\u53d6\u5e76\u5224\u65ad\u7cfb\u7edf\u7248\u672c<br \/>\n   <\/span><br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff08\u672a\u6765\u53ef\u80fd\u66f4\u6539\uff09<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff08\u8fd9\u90e8\u5206\u672a\u6765\u53ef\u80fd\u66f4\u6539\u4e3a\u901a\u8fc7\u5177\u4f53\u7248\u672c\u53f7\u5212\u5206\u7684\u68c0\u6d4b\u7b56\u7565\uff09<br \/>\n   <\/span><br \/>\n   \u8fd9\u91cc\u6211\u4eec\u901a\u8fc7\u00a0RtlGetNtVersionNumbers \u51fd\u6570\u6765\u83b7\u53d6 OS \u7248\u672c\u53f7\uff0c\u5e76\u6839\u636e\u7248\u672c\u53f7\u4fe1\u606f\u6765\u5206\u7c7b\uff0c\u4e3b\u8981\u5206\u4e09\u7c7b\uff1a\uff081\uff09Win Vista \u6216\u8005\u66f4\u65e9\uff1b\uff082\uff09Win 7 \u548c Win 8\uff08<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u4f46\u662f Win7 \u8981\u5355\u72ec\u68c0\u67e5 Uxsms \u670d\u52a1<br \/>\n   <\/span><br \/>\n   \uff09\uff1b\uff083\uff09Win 8.1 \u81f3\u4eca\n  <\/p>\n<p>\n   \u4e0b\u8868\u5217\u51fa\u4e86\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u53f7\uff1a\n  <\/p>\n<table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td style=\"text-align:center\">\n      \u5e8f\u53f7\n     <\/td>\n<td style=\"text-align:center\">\n      \u7cfb\u7edf\u540d\u79f0\n     <\/td>\n<td style=\"text-align:center\">\n      OS \u7248\u672c\u53f7\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      1\n     <\/td>\n<td style=\"text-align:center\">\n      Windows Vista\n     <\/td>\n<td style=\"text-align:center\">\n      6.0\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      2\n     <\/td>\n<td style=\"text-align:center\">\n      Windows 7\n     <\/td>\n<td style=\"text-align:center\">\n      6.1\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      3\n     <\/td>\n<td style=\"text-align:center\">\n      Windows 8\n     <\/td>\n<td style=\"text-align:center\">\n      6.2\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      4\n     <\/td>\n<td style=\"text-align:center\">\n      Windows 8.1\n     <\/td>\n<td style=\"text-align:center\">\n      6.3\n     <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">\n      5\n     <\/td>\n<td style=\"text-align:center\">\n      Windows 10, 11\n     <\/td>\n<td>\n<p style=\"text-align:center\">\n       10.0\n      <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n   \u6839\u636e\u8981\u6c42\uff0c\u7f16\u5199\u7684\u7cfb\u7edf\u5206\u7c7b\u4ee3\u7801\u5982\u4e0b\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">int CheckOsVersion()\n{\n    int OsVersion = -1;\n    typedef void(__stdcall* NTPROC)(DWORD*, DWORD*, DWORD*);\n    HINSTANCE hinst = GetModuleHandleA(\"ntdll.dll\");\/\/\u52a0\u8f7dDLL\n\n    NTPROC GetNtVersionNumbers = (NTPROC)\n        GetProcAddress(hinst, \"RtlGetNtVersionNumbers\");\/\/\u83b7\u53d6\u51fd\u6570\u5730\u5740\n    if (!hinst || !GetNtVersionNumbers)\n    {\n        return 0;\n    }\n\n    DWORD dwMajor, dwMinor, dwBuildNumber;\n    GetNtVersionNumbers(&amp;dwMajor, &amp;dwMinor, &amp;dwBuildNumber);\n\n    \/* \u65e7\u7248\u672c\u5224\u65ad\n    if (dwMajor &lt;= 6 &amp;&amp; dwMinor &lt;= 2)\n    {\n\n        if (dwMajor == 6 &amp;&amp; dwMinor &gt;= 1) return 2;\/\/ win 7, win8\n        else return 1;\/\/ win XP, vista\n    }\n    else {\n        return 3;\/\/ win8.1,10,11\n    }\n    *\/\n    \/\/ \u589e\u52a0\u5bf9 Win 7 \u7684\u7279\u6b8a\u5206\u7c7b\u5904\u7406\n    switch (dwMajor)\n    {\n    case 6:\n        if (dwMinor == 0) \/\/ Vista\n        {\n            OsVersion = 1;\n        }\n        else if (dwMinor == 1)  \/\/ Win 7\n        {\n            OsVersion = 2;\n        }\n        else if (dwMinor == 2)  \/\/ Win 8\n        {\n            OsVersion = 3;\n        }\n        else if (dwMinor == 3)  \/\/ Win 8.1\n        {\n            OsVersion = 4;\n        }\n        break;\n    case 10:\n        OsVersion = 4; \/\/ Win 10, 11\n        break;\n    default:\n        if(dwMajor &lt;= 5)  \/\/ Win XP\n            OsVersion = 1;\n        else\n            OsVersion = 5; \/\/  Future\n        break;\n    }\n    \n    return OsVersion;\n}<\/code><\/pre>\n<h4 id=\"2.3%20%E8%A7%A3%E5%86%B3%E9%80%80%E5%87%BA%E7%A8%8B%E5%BA%8F%E6%97%B6%E7%AA%97%E5%8F%A3%E6%AE%8B%E5%BD%B1%E9%97%AE%E9%A2%98\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.4 \u89e3\u51b3\u9000\u51fa\u7a0b\u5e8f\u65f6\u7a97\u53e3\u6b8b\u5f71\u95ee\u9898<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     \uff08\u8fd9\u90e8\u5206\u8865\u5145\u5185\u5bb9\u521b\u5efa\u4e8e 2024.03.19\uff0c\u66f4\u65b0\u4e8e 2024.06.25\uff09<br \/>\n    <\/strong><br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u5b8c\u6210\u4e86\u4e0a\u9762\u7684\u6240\u6709\u64cd\u4f5c\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u4e00\u4e2a\u7a97\u53e3\u63d2\u5165\u5230\u684c\u9762\u7a97\u53e3\u5c42\u4e4b\u4e2d\uff0c\u5e76\u6210\u529f\u663e\u793a\u51fa\u6211\u4eec\u7684\u7a97\u53e3\u3002\u4f46\u662f\uff0c\u5f53\u6211\u4eec\u7684\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u5173\u95ed\u540e\uff0c\u684c\u9762\u56fe\u6807\u5c42\u4f9d\u7136\u663e\u793a\u7a97\u53e3\u5173\u95ed\u524d\u7684\u7ed8\u56fe\u3002\u8fd9\u662f\u7531\u684c\u9762\u7a97\u53e3\u5c42\u7684\u5ef6\u8fdf\u6e32\u67d3\u5bfc\u81f4\u7684\uff0c\u684c\u9762\u56fe\u6807\u5c42\u4e0d\u4f1a\u5728\u80cc\u666f\u5c42\u66f4\u65b0\u65f6\u7acb\u5373\u66f4\u65b0\u81ea\u8eab\u7684\u80cc\u666f\u526f\u672c\u3002\n  <\/p>\n<p>\n   \u89e3\u51b3\u65b9\u6cd5\u5c31\u662f\u901a\u77e5\u684c\u9762\u7a97\u53e3 \u201c\u684c\u9762\u58c1\u7eb8\u5c42\u5df2\u7ecf\u66f4\u65b0\u201d \u7684\u6d88\u606f\u3002\u6211\u4eec\u4f7f\u7528 SystemParametersInfo \u51fd\u6570\u6765\u5b9e\u73b0\u53d1\u9001\u7279\u5b9a\u4e8e\u7cfb\u7edf\u7684\u901a\u77e5\u6d88\u606f\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, nullptr, SPIF_UPDATEINIFILE);<\/code><\/pre>\n<p>\n   \u5f53\u6267\u884c\u8be5\u51fd\u6570\u540e\uff0c\u6d88\u606f\u53d1\u9001\u4f1a\u4f7f\u5f97\u684c\u9762\u7a97\u53e3\u5c42\u91cd\u65b0\u521b\u5efa\u80fd\u591f\u663e\u793a\u684c\u9762\u58c1\u7eb8\uff08\u526f\u672c\uff09\u7684 WorkerW \u7a97\u53e3\u3002\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6ce8\u91ca\uff1a\u82e5\u4ee5\u624b\u52a8\u65b9\u5f0f\u70b9\u51fb\u4efb\u52a1\u680f\u4e0a\u7684 \u201c\u4efb\u52a1\u89c6\u56fe\u201d \u7a97\u53e3\uff0c\u4e5f\u4f1a\u89e6\u53d1\u5237\u65b0\u8fc7\u7a0b\uff0c\u53ea\u4e0d\u8fc7\u6b64\u65f6\u4e00\u822c\u4e0d\u91cd\u5efa WorkerW\u3002\u800c\u901a\u8fc7\u8be5\u65b9\u5f0f\u5b8c\u6210\u7684\u64cd\u4f5c\u5219\u4f1a\u91cd\u5efa\u7a97\u53e3\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    \u6ce8\u610f\uff1a\u6b64\u5237\u65b0\u684c\u9762\u58c1\u7eb8\u7a97\u53e3\u7684 API \u662f\u5f02\u6b65\u7684\uff0c<br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u5f53\u5728\u521d\u59cb\u5316\u52a8\u6001\u58c1\u7eb8\u65f6\u5c1d\u8bd5\u4f7f\u7528\u8be5\u64cd\u4f5c\u5237\u65b0\u684c\u9762\uff0c\u6709\u53ef\u80fd\u5bfc\u81f4\u540e\u9762\u83b7\u53d6\u5230\u9519\u8bef\u7684 WorkerW \u7a97\u53e3\uff0c\u5982\u9700\u4f7f\u7528\u8bf7\u8bbe\u7f6e\u5ef6\u8fdf\u6216\u68c0\u67e5\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u4f60\u73b0\u5728\u5f97\u5230\u4e86\u4e00\u4e2a\u65b0\u7684 WorkerW \u7a97\u53e3\uff08\u90e8\u5206\u7cfb\u7edf\u4e0a\u4e0d\u4f1a\u91cd\u5efa\u7a97\u53e3\uff09\uff0c\u5e76\u5728\u5185\u90e8\u5904\u7406\u673a\u5236\u7684\u534f\u52a9\u4e0b\u5237\u65b0\u4e86\u684c\u9762\u56fe\u6807\u5c42\u7684\u7ed8\u56fe\u3002\u6240\u4ee5\uff0c\u4f60\u5c06\u5f97\u5230\u4e00\u4efd\u5e72\u51c0\u7684\u539f\u59cb\u684c\u9762\u3002\n  <\/p>\n<h4 id=\"2.3%20%E8%A1%A5%E5%85%85%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9\">\n   <span style=\"color:#0d0016\"><br \/>\n    2.5 \u4e0a\u6587\u6ce8\u610f\u4e8b\u9879\u7684\u4e00\u4e9b\u8865\u5145<br \/>\n   <\/span><br \/>\n  <\/h4>\n<blockquote>\n<p>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u6ce8\u610f\uff1a\u4ee5\u4e0b\u8865\u5145\u5185\u5bb9\u4ec5\u9002\u7528\u4e8e Win11 23H2 \u4ee5\u53ca\u66f4\u65e9\u671f\u7cfb\u7edf\u7684\u8bbe\u7f6e\uff0c\u5bf9\u4e8e 24H2\u00a0\u4ee5\u53ca\u66f4\u9ad8\u7248\u672c\u5c06\u4e0d\u9002\u7528\uff0c\u672a\u6765\u5c06\u91cd\u5199\u8fd9\u91cc\u7684\u7a97\u53e3\u904d\u5386\u4ee3\u7801\u903b\u8f91\u3002<br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      [\u622a\u81f3\u76ee\u524d\u66f4\u65b0\u672a\u5b8c\u5168\u89e3\u51b3\u95ee\u9898]<br \/>\n     <\/strong><br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u7b2c\u4e00\u70b9\uff1a\u5728\u679a\u4e3e\u7a97\u53e3\u7684\u65f6\u5019\uff0c\u6211\u4eec\u91c7\u7528\u7684\u662f\u5148\u627e\u5230 ShellDefView\uff0c\u518d\u53bb\u83b7\u53d6\u5176\u4ed6\u7a97\u53e3\u53e5\u67c4\uff0c\u9ed8\u8ba4\u4e86 DefView \u7684\u7236\u7a97\u53e3\u4e3a WorkerW 1\uff0c\u8fd9\u5b9e\u9645\u4e0a\u662f\u5b58\u5728\u95ee\u9898\u7684\uff0c\u5728\u7a97\u53e3\u4e0d\u5b58\u5728\u6216\u8005 DWM \u5f02\u5e38\u7684\u65f6\u5019\uff0c\u4ee3\u7801\u7ee7\u7eed\u6267\u884c\uff0c\u540e\u9762\u7684\u884c\u4e3a\u4e0d\u53ef\u9884\u77e5\uff0c\u6240\u4ee5\u6211\u4eec\u8981\u5bf9 EnumWindow \u83b7\u53d6\u5230\u7684\u53e5\u67c4\u8fdb\u884c\u7b80\u5355\u7684\u9a8c\u8bc1\uff1a\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \/\/ \u9a8c\u8bc1\u65b9\u6cd5<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     if (hWorkerW1 != NULL &amp;&amp; hWorkerW1 != hwnd<br \/>\n     <br \/>\n     &amp;&amp; hParent == hWorkerW1)<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<pre><code class=\"language-cpp\">(*lpWndInfo).Progman = hwnd;\nprintf(\"[*] EnumDesktopWorkerWindows...\\n\");\n\n\/\/\u679a\u4e3e\u7a97\u53e3\nSetLastError(0);\nif (!EnumWindows(EnumWindowsProc, (LPARAM)lpWndInfo) || GetLastError() &gt; 0)\n{\n    printf(\"[-] EnumWindows failed.\\n\");\n    return FALSE;\n}\nprintf(\"[+] EnumWindows Finished.\\n\");\n\n\/\/ \u6821\u9a8c WorkerW1 \u662f\u5426\u662f\u7a97\u53e3\u662f\u684c\u9762\u3002\nhWorkerW1 = (*lpWndInfo).Workerw1;\nhWorkerW2 = (*lpWndInfo).Workerw2;\nhDefView = (*lpWndInfo).ShellDefView;\n\nHWND hParent = GetParent(hDefView);\n\nif (hWorkerW1 != NULL &amp;&amp; hWorkerW1 != hwnd\n    &amp;&amp; hParent == hWorkerW1) \/\/ DWM \u6b63\u5e38\u65f6\uff0c\u7a97\u53e3\u4e0d\u5e94\u8be5\u662f Progman \u5e94\u8be5\u662f WorkerW\n{\n    printf(\"[+] EnumWindows successfully.\\n \\n\");\n    printf(\"[+] WorkerW 1: [ 0x%I64X ] | WorkerW 2: [ 0x%I64X ]\\n\", \n        (long long)hWorkerW1,\n        (long long)hWorkerW2);\n}\nelse {\n    printf(\"[-] EnumWindows failed.\\n \\n\");\n    return FALSE;\n}<\/code><\/pre>\n<p>\n   \u7b2c\u4e8c\u70b9\uff1a\u5bf9\u4e8e\u4e3b\u7a97\u53e3\u5904\u7406\u7ebf\u7a0b\uff0c\u6211\u4eec\u9700\u8981\u7ed9\u5176\u8bbe\u7f6e\u4e00\u5b9a\u7684\u5ef6\u8fdf\u548c\u5224\u65ad\u5176\u5b8c\u6210\u8fdb\u5ea6\u3001\u8d85\u65f6\u9650\u5236\u7b49\u7b49\uff0c\u4e0d\u80fd\u7b80\u5355\u8bbe\u7f6e Sleep \u5565\u7684\u3002\u7b49\u5f85\u662f\u4f7f\u7528 WaitForSingleObject \u548c GetExitCodeThread \u51fd\u6570\u5b8c\u6210\u7684\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">start = clock();\/\/ \u5f00\u59cb\u8ba1\u65f6\n    HANDLE hThread = CreateThread(NULL, 0, mainWindowThread, lpWndInfo, 0, NULL);\n    if (hThread == NULL)\n    {\n        printf(\"[*] CreateThread failed.err_code[ %d ]\\n\", GetLastError());\n        return FALSE;\n    }\n    DWORD dwExitCode = 0;\n    \/\/ \u7b49\u5f85\u7a97\u53e3\u52a0\u8f7d\u5b8c\u6210\n    do {\n        IsGetExitCode = GetExitCodeThread(hThread, &amp;dwExitCode);\n        WaitForSingleObject(hThread, 0);\/\/ WAIT_TIMEOUT\n        CreateFlag = (*lpWndInfo).IsCreatedWindow;\n        finish = clock();\n        duration = (double)(finish - start) \/ CLOCKS_PER_SEC;\n    } while (!CreateFlag &amp;&amp; \/\/ \u5224\u65ad\u7a97\u53e3\u662f\u5426\u5df2\u7ecf\u521b\u5efa\n        dwExitCode == STILL_ACTIVE \/\/ \u5224\u65ad\u7ebf\u7a0b\u662f\u5426\u8fd8\u5b58\u6d3b\n        &amp;&amp; IsGetExitCode != FALSE \/\/ \u5982\u679c\u5d29\u6e83\u9000\u51fa\uff0c\u5219\u7ed3\u675f\u7b49\u5f85\n        &amp;&amp; fabs(duration) &lt;= eps);\/\/ \u7b49\u5f85\u8d85\u65f6\u65f6\u95f4\n    if (!CreateFlag)\/\/ \u9519\u8bef\u65e5\u5fd7\n    {\n        printf(\"[*] CreateThread failed. ERROR_TIMEOUT\\n \\n\");\n        return FALSE;\n    }\n    else {\n        printf(\"[+] Thread Handle: [ 0x%I64X ]\\n \\n\", (long long)hThread);\n        return TRUE;\n    }<\/code><\/pre>\n<p>\n   \u7b2c\u4e09\u70b9\uff1aSetParent \u8bbe\u7f6e\u7236\u7a97\u53e3\u9700\u8981\u68c0\u67e5\uff0c\u7236\u7a97\u53e3\u4e0d\u53ef\u662f NULL\uff0c\u8fd9\u6837\u5b50\u53ef\u4ee5\u5728\u6700\u540e\u4e00\u6b65\u524d\u4e5f\u80fd\u591f\u9632\u6b62\u5f02\u5e38\u503c\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">printf(\"[*] SetParent: SetWallpaperWindow.\\n\");\n    \n    if (Version == 2 || Version == 3) \/\/  Win 7, Win 8\n    {\n        if (hProgman == NULL)\/\/ TODO\uff1a\u7236\u7a97\u53e3\u4e0d\u53ef\u4ee5\u4e3a NULL\n        {\n            PostMessageW(hClientWnd, SC_CLOSE, 0,0);\n            SetLastError(ERROR_INVALID_WINDOW_HANDLE);\n            printf(\"[-] SetParent Fatal error: hParent must not be NULL.\\n\");\n            return FALSE;\n        }\n        ShowWindow(hWorkerW, SW_HIDE);\n        SetLastError(0);\n        LastParent = SetParent(hClientWnd, hProgman);\n    }\n    else {\n        if (hWorkerW == NULL)\n        {\n            PostMessageW(hClientWnd, SC_CLOSE, 0, 0);\n            SetLastError(ERROR_INVALID_WINDOW_HANDLE);\n            printf(\"[-] SetParent Fatal error: hParent must not be NULL.\\n\");\n            return FALSE;\n        }\n        SetLastError(0);\n        LastParent = SetParent(hClientWnd, hWorkerW);\n    }\n\n    nSPerror = GetLastError();\n    if (nSPerror &gt; 0 || LastParent == NULL)\n    {\n        printf(\"[-] FatalError: SetParent Error!err_code[ %d ]\\n \\n\", nSPerror);\n        return FALSE;\n    }\n    printf(\"[+] SetParent Success, hChild[ 0x%I64X ] | hParent[ 0x%I64X ].\\n \\n\",\n        (long long)hClientWnd, \n        Version == 2 ? (long long)hProgman : (long long)hWorkerW);<\/code><\/pre>\n<h3 id=\"2.5%20%E5%85%B3%E4%BA%8E%200x052C%20%E7%A7%81%E6%9C%89%E6%B6%88%E6%81%AF%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94\">\n   <span style=\"color:#0d0016\"><br \/>\n    3 \u5173\u4e8e 0x052C \u79c1\u6709\u6d88\u606f\u7684\u517c\u5bb9\u6027\u95ee\u9898<br \/>\n   <\/span><br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff08\u91cd\u8981\uff09<br \/>\n   <\/span><br \/>\n  <\/h3>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff08\u6b64\u90e8\u5206\u4e8e 2024.06.04 \u8865\u5145\uff09<br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u672c\u6587\u4ecb\u7ecd\u7684\u8bbe\u7f6e\u52a8\u6001\u58c1\u7eb8\u56fe\u5c42\u7684\u65b9\u6cd5\u662f\u5229\u7528\u4e86\u4ece\u00a0Win 7 SP1\uff08\u518d\u5f80 Win7 \u65e9\u671f\u7248\u672c\u63a8\u6682\u65f6\u4e0d\u786e\u5b9a\u662f\u5426\u652f\u6301\uff0c\u6709\u8d44\u6599\u663e\u793a\u6253 SP1 \u8865\u4e01\u4e4b\u524d\u90e8\u5206\u7248\u672c\u4e0a\u9762\u4e0d\u652f\u6301\uff09\u5f00\u59cb\u7684\u684c\u9762\u58c1\u7eb8\u5e73\u6ed1\u5207\u6362\u673a\u5236\uff0c\u5728\u8be5\u8fc7\u7a0b\u4e2d\uff0cexplorer \u7684 PM (Program Manager) \u58c1\u7eb8\u5c42\u63a5\u53d7\u79c1\u6709\u6d88\u606f 0x052C \uff08\u5927\u4e8e 0x400 \u7684\u5c5e\u4e8e\u7528\u6237\u81ea\u5b9a\u4e49\u6d88\u606f\uff09\uff0c\u8fd9\u4f1a\u4f7f\u5f97\u5728 Defview( SHELL_DefView)\u00a0\u56fe\u6807\u5c42\u548c PM \u58c1\u7eb8\u5c42\u4e4b\u95f4\u5efa\u7acb\u4e24\u4e2a\u7f13\u51b2\u56fe\u5c42\uff08\u7ed8\u5236\u5728\u7a97\u53e3\u4e0a\uff09\uff0c\u8fd9\u4e24\u4e2a\u7a97\u53e3\u5177\u6709 &#8220;WorkerW&#8221; \u7c7b\u540d\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u53d1\u9001\u79c1\u6709\u6d88\u606f\u540e\u7684\u7a97\u53e3\u5c42\u6b21\uff08\u4e00\u822c\u60c5\u51b5\uff09<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<h4 id=\"3.1%200x052C%20%E5%A4%84%E7%90%86%E6%9C%BA%E5%88%B6%E7%9A%84%E6%BD%9C%E5%9C%A8%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98\">\n   <span style=\"color:#0d0016\"><br \/>\n    3.1 0x052C \u5904\u7406\u673a\u5236\u7684\u6f5c\u5728\u517c\u5bb9\u6027\u95ee\u9898<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   \u6211\u4eec\u9700\u8981\u660e\u767d\u7684\u662f\uff0c\u4e24\u4e2a WorkerW \u7a97\u53e3\u5e76\u4e0d\u662f\u6ca1\u6709\u4f5c\u7528\u7684\u3002\u5b83\u4eec\u662f\u4e3a\u4e86\u5728\u53d1\u751f\u6d3b\u52a8\u684c\u9762\u72b6\u6001\u5207\u6362\u65f6\uff0c\u7ed8\u5236\u51fa\u52a8\u753b\u6548\u679c\uff08\u53ef\u4ee5\u7406\u89e3\u4e3a\u5728\u8499\u7248\u4e0a\u9762\u7ed8\u5236\u51fa\u52a8\u753b\u8fc7\u6e21\uff09\u800c\u88ab\u521b\u5efa\u7684\uff08\u901a\u8fc7 SHCreateWorkerWindowW \u51fd\u6570\u521b\u5efa\uff0c\u968f\u540e SetWindowLongPtrW \u8bbe\u7f6e\u7a97\u53e3\u56de\u8c03\u51fd\u6570\uff09\u3002\n  <\/p>\n<p>\n   \u7814\u7a76\u53d1\u73b0\uff0c0x052C \u6d88\u606f\u7684 wParam \u548c lParam \u4e0d\u662f\u6ca1\u6709\u7528\u7684\uff0c\u4e5f\u4e0d\u662f\u4e00\u76f4\u8bbe\u7f6e\u4e3a 0\u3002\n  <\/p>\n<p>\n   \u5f53 wParam \u8bbe\u7f6e\u4e3a 1 \u65f6\uff0c\u4f1a\u9500\u6bc1 WorkerW \u7a97\u53e3\uff0c\u4e3a 0 \u662f\u9ed8\u8ba4\u7684\u521b\u5efa WorkerW \u7a97\u53e3\u3002\u6b64\u5916\uff0c\u4e00\u4e9b\u5176\u4ed6\u7279\u6b8a\u503c\u4f1a\u5e26\u6765\u7ec6\u8282\u4e0a\u4e0d\u540c\u7684\u7ed3\u679c\u3002\uff08\u5206\u6790\u6765\u81ea\u6587\u7ae0\uff1a<br \/>\n   <a class=\"link-info\" href=\"https:\/\/tieba.baidu.com\/p\/5015219921#:~:text=%E7%84%B6%E5%90%8E%E8%AF%B4%E4%B8%80%E4%B8%8B%E5%8E%9F%E6%96%87%E6%B2%A1%E8%AF%B4%E7%9A%84%E5%A6%82%E4%BD%95%E9%94%80%E6%AF%81WorkerW%E7%AA%97%E5%8F%A3%EF%BC%8C%E5%8F%91%E9%80%810x52c%E6%B6%88%E6%81%AF%EF%BC%8CwParam%E8%AE%BE%E4%B8%BA1%E5%B0%B1%E5%A5%BD%E4%BA%86\" rel=\"nofollow\" title=\"\u300a\u5982\u4f55\u5c06\u7a97\u53e3\u7ed8\u5236\u5230\u684c\u9762\u56fe\u6807\u4e0b\u300b\"><br \/>\n    \u300a\u5982\u4f55\u5c06\u7a97\u53e3\u7ed8\u5236\u5230\u684c\u9762\u56fe\u6807\u4e0b\u300b<br \/>\n   <\/a><br \/>\n   \uff09\n  <\/p>\n<p>\n   \u5bf9 WorkerW \u7684\u673a\u5236\u7814\u7a76\u4e0d\u591f\u7cbe\u7ec6\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u5f53\u6211\u4eec\u53ea\u662f\u7c97\u5fc3\u5730\u5c06\u7a97\u53e3\u653e\u7f6e\u5728\u7b2c\u4e8c\u4e2a WorkerW \u7a97\u53e3\u4e0b\u6216\u8005 PM \u7a97\u53e3\u4e0b\u5c31\u53bb\u5403\u996d\u65f6\uff0c\u6709\u53ef\u80fd\u51fa\u73b0\u4e00\u4e9b\u610f\u5916\u7684\u60c5\u51b5\u3002\u5177\u4f53\u60c5\u51b5\u6709\uff08\u90e8\u5206\u63d0\u793a\u6765\u81ea<br \/>\n   <a class=\"link-info\" href=\"https:\/\/space.bilibili.com\/160424952?spm_id_from=333.788.0.0\" rel=\"nofollow\" title=\"@ CLeDen\"><br \/>\n    @ CLeDen<br \/>\n   <\/a><br \/>\n   \u7684<br \/>\n   <a class=\"link-info\" href=\"https:\/\/www.bilibili.com\/video\/BV1HZ4y1978a\/?vd_source=cf63f3b646aa6dd43dbdc8b7a2731ab0#:~:text=%E9%A6%96%E5%85%88%E6%98%AF%E4%B8%8D%E5%90%8C%E7%89%88%E6%9C%AC%E7%B3%BB%E7%BB%9F%E4%B8%8A%E8%A1%A8%E7%8E%B0%E4%B8%8D%E5%A4%AA%E4%B8%80%E6%A0%B7%EF%BC%8C%E7%84%B6%E5%90%8E%20Windows%2010%20%E4%B8%8A%E6%9C%89%E7%9A%84%E7%89%88%E6%9C%AC%E8%A1%8C%E4%B8%8D%E9%80%9A%EF%BC%8C%E8%BF%99%E6%97%B6%E5%80%99%E5%8F%AF%E4%BB%A5%E8%AF%95%E8%AF%95%E5%9C%A8%E8%AE%BE%E7%BD%AE%E9%87%8C%E9%9D%A2%E5%B0%86%E5%A3%81%E7%BA%B8%E8%AE%BE%E7%BD%AE%E6%88%90%E2%80%9C%E5%B9%BB%E7%81%AF%E7%89%87%E6%94%BE%E6%98%A0%E2%80%9D%E6%A8%A1%E5%BC%8F%E5%86%8D%E8%AF%95%E8%AF%95%EF%BC%8C%E5%9B%A0%E4%B8%BA%20WorkerW%20%E7%9A%84%E5%AD%98%E5%9C%A8%E6%9C%AC%E6%9D%A5%E6%98%AF%E7%94%A8%E4%BD%9C%20Windows%20%E6%A1%8C%E9%9D%A2%E5%A3%81%E7%BA%B8%E5%88%87%E6%8D%A2%E6%97%B6%E5%80%99%E8%BF%87%E6%B8%A1%E7%94%A8%E7%9A%84%E3%80%82%E3%80%82%E3%80%82\" rel=\"nofollow\" title=\"\u8bc4\u8bba\"><br \/>\n    \u8bc4\u8bba<br \/>\n   <\/a><br \/>\n   \uff09\uff1a\n  <\/p>\n<ul>\n<li>\n    \u636e\u62a5\u9053\u90e8\u5206 Win 11 \u7cfb\u7edf\u4e0a\u5bf9\u9ed8\u8ba4\u7684 0 \u53c2\u6570\u6d88\u606f\u6ca1\u6709\u52a8\u4f5c\uff0c\u5fc5\u987b\u53d1\u9001\u5e26\u6709\u6709\u6548\u53c2\u6570\u7684 0x052C \u6d88\u606f\uff1a\u7b2c\u4e00\u6b21 wParam \u4e3a 0xD\uff0clParam \u4e3a 1\u3002\u4f46 wParam \u4e3a 0xD \u5c06\u81f3\u5c11\u5bfc\u81f4\u5728 Win7 \u4e0a\u8fd4\u56de\u9519\u8bef\u4ee3\u7801\uff1b\n   <\/li>\n<li>\n    \u5982\u679c\u5728\u7cfb\u7edf\u8bbe\u7f6e\u4e2d\u6307\u5b9a\u684c\u9762\u58c1\u7eb8\u6a21\u5f0f\u4e3a \u201c\u5e7b\u706f\u7247\u653e\u6620\u201d\uff0c\u5219\u5f53\u58c1\u7eb8\u5207\u6362\u8d85\u65f6\u65f6\u95f4\u5230\u8fbe\u65f6\uff0c\u7cfb\u7edf\u4f1a\u5728 WorkerW 2 \u7684\u524d\u9762\u521b\u5efa\u4e00\u4e2a\u65b0 WorkerW \u7a97\u53e3\u7528\u6765\u7ed8\u5236\u52a8\u753b\u3002\u5bfc\u81f4\u64ad\u653e\u52a8\u753b\u65f6\uff0c\u5728 WorkerW 3 \u4e0a\u7684\u8fc7\u6e21\u52a8\u753b\u5c06\u8986\u76d6 WorkerW 2 \u4e0a\u7684\u753b\u9762\uff0c\u5728\u52a8\u753b\u64ad\u653e\u7ed3\u675f\u540e\u624d\u80fd\u6062\u590d Worker 2 \u7684\u663e\u793a\uff08\u5f53\u4e0d\u900f\u660e\u5ea6\u8fbe\u5230 100% \u540e WorkerW 3 \u624d\u88ab\u5173\u95ed\uff09\uff1b\n   <\/li>\n<li>\n    \u5982\u679c\u7528\u6237\u6216\u5176\u4ed6\u5e94\u7528\u5c1d\u8bd5\u624b\u52a8\u8bbe\u7f6e\u7cfb\u7edf\u58c1\u7eb8\uff0c\u5219\u4f1a\u9ed8\u8ba4\u64ad\u653e\u5207\u6362\u52a8\u753b\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u65b0\u751f\u6210\u7684 WorkerW 3 \u7684\u753b\u9762\u77ed\u6682\u8986\u76d6 WorkerW 2 \u4e0a\u7684\u753b\u9762\uff1b\n   <\/li>\n<li>\n    \u5728\u5207\u6362\u865a\u62df\u684c\u9762\u65f6\uff0c\u4f1a\u51fa\u73b0\u52a8\u6001\u58c1\u7eb8\u7684\u753b\u9762\u6495\u88c2\u611f\u00a0 [ \u8fd9\u662f\u56e0\u4e3a\u7ed8\u5236\u7684\u7cfb\u7edf\u58c1\u7eb8\u7684\u6ed1\u52a8\u52a8\u753b\u5728 Z \u8f74\u4e0a\u8986\u76d6\u6211\u4eec\u7684\u7a97\u53e3\u3002 Program \u7a97\u53e3\u4f1a\u88ab\u8bbe\u7f6e\u5230 WorkerW 2 \u7a97\u53e3\u7684\u524d\u9762\uff1b\u968f\u540e\u5c06\u5305\u542b\u684c\u9762\u56fe\u6807\u7a97\u53e3\u7684\u00a0WorkerW 1 \u7a97\u53e3\u79fb\u52a8\u5230 Desktop Band \u4e2d\uff0c\u5e76\u5148\u8bbe\u7f6e\u00a0WorkerW 1 \u7a97\u53e3\u7684 Z \u5e8f\u5230\u7c7b\u540d\u4e3a tooltips_class32 \u7684\u7a97\u53e3\u7684\u524d\u9762\uff0c\u518d\u8bbe\u7f6e\u00a0WorkerW 1 \u7a97\u53e3\u4e3a Desktop \u7a97\u53e3\u7684\u6700\u5e95\u90e8\u7a97\u53e3\u3002\u8fd9\u5c06\u4f7f\u5f97\u684c\u9762\u56fe\u6807\u7a97\u53e3\u5728\u684c\u9762\u7528\u6237\u7a97\u53e3\u5e26\uff08Desktop Band\uff09\u7684\u540e\u9762\u5bfc\u81f4\u4e0d\u53ef\u89c1\uff0c\u4e8e\u662f\u51fa\u73b0\u52a8\u753b\u65f6\u5019\u6211\u4eec\u770b\u5230\u7684\u662f PM \u7a97\u53e3\u6216\u8005\u955c\u50cf\u5728\u6c34\u5e73\u6ed1\u52a8\uff0c\u540c\u65f6\u5c06\u89c2\u5bdf\u5230\u684c\u9762\u56fe\u6807\u77ed\u6682\u6d88\u5931\u7684\u73b0\u8c61]\uff1b\n   <\/li>\n<li>\n    \u9f20\u6807\u60ac\u505c\u5728\u975e\u6d3b\u52a8\u684c\u9762\u7684 DWM \u7f29\u7565\u56fe\u9884\u89c8\u7a97\u53e3\uff08ThumbnailToolsWindow\uff09\u4e0a\u9762\u65f6\uff0c\u6709\u673a\u4f1a\u64ad\u653e\u58c1\u7eb8\u5207\u6362\u52a8\u753b\uff0c\u5f53\u5176\u4e2d\u4e00\u4e2a\u684c\u9762\u7684\u58c1\u7eb8\u5df2\u7ecf\u66f4\u65b0\u65f6\u3002\u6b64\u65f6\uff0c\u4f1a\u51fa\u73b0\u753b\u9762\u8986\u76d6\uff1b\n   <\/li>\n<li>\n    \u865a\u62df\u591a\u684c\u9762\u7684 DWM \u7f29\u7565\u56fe\u9884\u89c8\u7a97\u53e3\u4e0a\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\u8986\u76d6\u540e\u7684\u684c\u9762\u52a8\u6001\u58c1\u7eb8\u7684\u56fe\u50cf\uff1b\n   <\/li>\n<li>\n    \u5728 Win8.1 \u4ee5\u53ca\u66f4\u65e9\u7cfb\u7edf\u4e0a\uff0c\u5728\u5173\u95ed\u89c6\u89c9\u52a8\u753b\u4f18\u5316\u540e\uff0c\u4f1a\u7acb\u5373\u9500\u6bc1\u5df2\u7ecf\u5b58\u5728\u7684 WorkerW \u7a97\u53e3\uff08\u8fd9\u4f1a\u4e00\u5e76\u7ed3\u675f\u5b50\u7a97\u53e3\uff09\uff0c\u4e4b\u540e 0x052C \u6d88\u606f\u5c06\u65e0\u6548\u5316\uff0c\u5bfc\u81f4\u4e0d\u80fd\u751f\u6210\u6709\u6548\u7684 WorkerW \u7a97\u53e3\uff1b\n   <\/li>\n<li>\n    \u5728 Win7 \u4e0a\uff0c\u66f4\u6539\u7cfb\u7edf\u4e3b\u9898\u65f6\uff0c\u4f1a\u91cd\u7ed8 WorkerW \u7a97\u53e3\u5e76\u4f7f\u5176\u518d\u6b21\u53ef\u89c1\uff08\u4e4b\u524d\u88ab\u6211\u4eec\u624b\u52a8\u9690\u85cf\uff09\uff0c\u5bfc\u81f4\u6211\u4eec\u7684\u58c1\u7eb8\u7a97\u53e3\u7684\u7ed8\u5236\u88ab\u8986\u76d6\uff1b\n   <\/li>\n<li>\n    \u5728 Win11 23H2 \u4e0a\u5207\u6362\u7cfb\u7edf\u4e3b\u9898\u65f6\uff0c\u4f1a\u7ed8\u5236\u6de1\u5165\u6de1\u51fa\uff0c\u77ed\u6682\u8986\u76d6\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\uff1b\n   <\/li>\n<li>\n    \u5728 Win11 24H2 \u9884\u89c8\u7248\u4e0a\u9762\u5207\u6362\u58c1\u7eb8\u6216\u8005\u4e3b\u9898\u5c06\u4f1a\u5bfc\u81f4 WorkerW \u7a97\u53e3\u88ab\u5173\u95ed\uff08\u5df2\u89e3\u51b3\uff0c\u5c06\u5728\u540e\u671f\u66f4\u65b0\u5230\u6587\u7ae0\uff09\uff1b\n   <\/li>\n<\/ul>\n<p>\n   \u5982\u4e0b\u56fe\u6240\u793a\u4e3a Win11 \u7684\u684c\u9762\u80cc\u666f\u64ad\u653e\u8bbe\u7f6e\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u8bbe\u7f6e\u4e3a &#8220;\u5e7b\u706f\u7247\u653e\u6620&#8221; \u5e76\u4e14\u8d85\u65f6\u65f6\u95f4\u8f83\u77ed\u65f6\u5bb9\u6613\u89c2\u5bdf\u5230\u8986\u76d6\u73b0\u8c61<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5f53\u5207\u6362\u64ad\u653e\u6a21\u5f0f\u4e3a \u201c\u5e7b\u706f\u7247\u64ad\u653e\u201d \u65f6\uff0c\u4f1a\u89e6\u53d1\u6de1\u5165\u6de1\u51fa\u52a8\u753b\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5e7b\u706f\u7247\u6a21\u5f0f\u5b58\u5728\u517c\u5bb9\u6027\u95ee\u9898<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5207\u6362\u4e3b\u9898\u65f6\uff0c\u4f1a\u64ad\u653e\u6de1\u5165\u6de1\u51fa\u52a8\u753b\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5207\u6362\u4e3b\u9898\u65f6\u5b58\u5728\u517c\u5bb9\u6027\u95ee\u9898<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u901a\u8fc7\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u53ef\u4ee5\u9a8c\u8bc1\u7a97\u53e3\u88ab\u8986\u76d6\u7684\u539f\u56e0\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u52a8\u753b\u64ad\u653e\u8fc7\u7a0b\u4e2d\u6709\u65b0\u7a97\u53e3\u521b\u5efa<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   <span style=\"color:#ff9900\"><br \/>\n    \u5907\u6ce8\uff08\u8fd9\u53ef\u80fd\u662f\u8bbe\u8ba1 BUG\uff09\uff1a\u5f53\u4e3b\u9898\u4e2d\u80cc\u666f\u64ad\u653e\u8bbe\u7f6e\u4e3a&#8221;\u56fe\u7247&#8221;\u65f6\uff0c\u5207\u6362\u5230\u6b64\u4e3b\u9898\u65f6\u4f1a\u5c1d\u8bd5\u5173\u95ed\u6240\u6709\u6ca1\u6709\u5b50\u7a97\u53e3\u4e14 Z \u5e8f\u4f4e\u4e8e WorkerW 1 \u7684 WorkerW \u7a97\u53e3\uff08\u4f30\u8ba1\u662f\u53ea\u5173\u95ed\u4e00\u4e2a\uff09\uff0c\u5e76\u4e14\u4e0d\u64ad\u653e\u6de1\u5165\u6de1\u51fa\u52a8\u753b\uff1b\u5f53\u4e0d\u5207\u6362\u4e3b\u9898\u7684\u524d\u63d0\u6761\u4ef6\u4e0b\uff0c\u5c06\u80cc\u666f\u64ad\u653e\u4e3a&#8221;\u56fe\u7247&#8221;\u7684\u8bbe\u5b9a\u6362\u6210&#8221;\u5e7b\u706f\u7247&#8221;\u518d\u6362\u56de&#8221;\u56fe\u7247&#8221;\uff0c\u4e0d\u4f1a\u989d\u5916\u5173\u95ed\u00a0WorkerW\uff08\u4e5f\u5c31\u662f\u8bf4\u53ea\u4f1a\u5173\u4e00\u6b21\uff09\uff0c\u8fd9\u4f7f\u5f97\u540e\u9762\u5207\u6362\u80cc\u666f\u56fe\u7247\u4e5f\u4f1a\u6b63\u5e38\u64ad\u653e\u52a8\u753b\u3002\u7531\u6b64\u53ef\u89c1\uff0c\u76ee\u524d 23H2 \u5728\u5173\u95ed\u52a8\u753b\u7a97\u53e3\u7684\u8bbe\u8ba1\u4e0a\u662f\u5b58\u5728 BUG \u7684\u3002<br \/>\n   <\/span>\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6de1\u5165\u6de1\u51fa\u52a8\u753b\u7684 BUG<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<\/p>\n<p>\n   \u4ee3\u7801\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;vector&gt;\n#include &lt;iostream&gt;\n#include &lt;algorithm&gt;\n#include &lt;string&gt;\n\n\/\/ \u7ed3\u6784\u4f53\u7528\u4e8e\u5b58\u50a8\u7a97\u53e3\u4fe1\u606f\nstruct WindowInfo {\n    HWND hwnd;\n    HWND shellViewHwnd;\n};\n\n\/\/ \u5168\u5c40\u53d8\u91cf\nstd::vector&lt;WindowInfo&gt; trackedWindows;\nstd::vector&lt;HWND&gt; prevZOrder;\n\n\/\/ \u83b7\u53d6\u7a97\u53e3\u7684\u7c7b\u540d\u548c\u6807\u9898\nstd::string GetWindowClassAndTitle(HWND hwnd) {\n    char className[256];\n    char windowTitle[256];\n\n    GetClassNameA(hwnd, className, sizeof(className));\n    GetWindowTextA(hwnd, windowTitle, sizeof(windowTitle));\n\n    std::string result = std::string(className) + \" - \" + std::string(windowTitle);\n    return result;\n}\n\n\/\/ \u679a\u4e3e\u5b50\u7a97\u53e3\uff0c\u5bfb\u627e SHELLDLL_DefView\nBOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam) {\n    char className[256];\n    GetClassNameA(hwnd, className, sizeof(className));\n\n    if (strcmp(className, \"SHELLDLL_DefView\") == 0) {\n        WindowInfo* info = reinterpret_cast&lt;WindowInfo*&gt;(lParam);\n        info-&gt;shellViewHwnd = hwnd;\n        return FALSE;  \/\/ \u627e\u5230\u76ee\u6807\u7a97\u53e3\uff0c\u505c\u6b62\u679a\u4e3e\n    }\n    return TRUE;  \/\/ \u7ee7\u7eed\u679a\u4e3e\n}\n\n\/\/ \u679a\u4e3e\u9876\u5c42\u7a97\u53e3\uff0c\u5bfb\u627e WorkerW\nBOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) {\n    char className[256];\n    GetClassNameA(hwnd, className, sizeof(className));\n\n    if (strcmp(className, \"WorkerW\") == 0) {\n        WindowInfo info;\n        info.hwnd = hwnd;\n        info.shellViewHwnd = nullptr;\n\n        \/\/ \u679a\u4e3e WorkerW \u7684\u5b50\u7a97\u53e3\n        EnumChildWindows(hwnd, EnumChildProc, reinterpret_cast&lt;LPARAM&gt;(&amp;info));\n\n        if (info.shellViewHwnd) {\n            \/\/ \u627e\u5230\u5305\u542b SHELLDLL_DefView \u7684 WorkerW \u7a97\u53e3\n            trackedWindows.push_back(info);\n        }\n    }\n    return TRUE;\n}\n\n\/\/ \u83b7\u53d6\u76ee\u6807\u7a97\u53e3\u4e0b\u7684 Z \u5e8f\u987a\u5e8f\nstd::vector&lt;HWND&gt; GetZOrder(HWND target) {\n    std::vector&lt;HWND&gt; zOrder;\n    HWND hwnd = target;\n    while ((hwnd = GetNextWindow(hwnd, GW_HWNDNEXT)) != nullptr) {\n        zOrder.push_back(hwnd);\n    }\n    return zOrder;\n}\n\n\/\/ \u6253\u5370 Z \u5e8f\u548c\u7a97\u53e3\u4fe1\u606f\nvoid PrintZOrder(const std::vector&lt;HWND&gt;&amp; zOrder) {\n    for (HWND hwnd : zOrder) {\n        std::cout &lt;&lt; \"HWND: \" &lt;&lt; hwnd &lt;&lt; \" - \" &lt;&lt; GetWindowClassAndTitle(hwnd) &lt;&lt; std::endl;\n    }\n}\n\n\/\/ \u76d1\u63a7 Z \u5e8f\u53d8\u5316\nvoid MonitorZOrder() {\n    while (true) {\n        for (const auto&amp; winInfo : trackedWindows) {\n            std::vector&lt;HWND&gt; currentZOrder = GetZOrder(winInfo.hwnd);\n            if (currentZOrder != prevZOrder) {\n                std::cout &lt;&lt; \"Z-order has changed!\" &lt;&lt; std::endl;\n                PrintZOrder(currentZOrder);\n                prevZOrder = currentZOrder;\n            }\n        }\n        Sleep(100);  \/\/ \u6bcf100ms\u68c0\u67e5\u4e00\u6b21\n    }\n}\n\nint main() {\n    \/\/ \u7b2c\u4e00\u6b65\uff1a\u679a\u4e3e WorkerW \u7a97\u53e3\uff0c\u627e\u5230\u5305\u542b SHELLDLL_DefView \u7684\u7a97\u53e3\n    EnumWindows(EnumWindowsProc, 0);\n\n    if (trackedWindows.empty()) {\n        std::cout &lt;&lt; \"No WorkerW windows with SHELLDLL_DefView found.\" &lt;&lt; std::endl;\n        return 0;\n    }\n\n    \/\/ \u7b2c\u4e8c\u6b65\uff1a\u83b7\u53d6\u521d\u59cb Z \u5e8f\u987a\u5e8f\u5e76\u6253\u5370\u7a97\u53e3\u4fe1\u606f\n    for (const auto&amp; winInfo : trackedWindows) {\n        prevZOrder = GetZOrder(winInfo.hwnd);\n        PrintZOrder(prevZOrder);\n    }\n\n    \/\/ \u7b2c\u4e09\u6b65\uff1a\u76d1\u63a7 Z \u5e8f\u53d8\u5316\n    MonitorZOrder();\n\n    return 0;\n}<\/code><\/pre>\n<p>\n   \u800c\u5728 Windows 7 \u4e0a\uff0c\u5207\u6362\u4e3b\u9898\u65f6\u5019\uff0c\u4f1a\u901a\u8fc7\u5728 WorkerW\u00a0\u7a97\u53e3\u7684\u8bbe\u5907\u4e0a\u4e0b\u6587\u91cd\u7ed8 PM \u7a97\u53e3\u7684\u56fe\u50cf\uff08\u6b64\u65f6\u88ab\u9690\u85cf\u7684 WorkerW \u7a97\u53e3\u4f1a\u663e\u793a\u51fa\u6765\uff09\u3002\u5bfc\u81f4\u6211\u4eec\u7684\u58c1\u7eb8\u7a97\u53e3\u65e0\u6cd5\u663e\u73b0\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win 7 \u5d4c\u5165\u52a8\u6001\u58c1\u7eb8\u72b6\u6001<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u4e0b\u56fe\u662f\u76d1\u89c6\u8be5 WorkerW \u7a97\u53e3\u7684\u6d88\u606f\u65e5\u5fd7\uff0c\u5173\u6ce8\u7ea2\u8272\u6846\u51fa\u7684\u90e8\u5206\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u4e3b\u9898\u53d1\u751f\u5207\u6362\u65f6\u63a5\u6536\u5230\u7684\u6d88\u606f<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u89c2\u5bdf\u4e0b\u56fe\u6240\u793a\u7684\u4e3b\u9898\u5207\u6362\u65f6\uff0c Win7 \u52a8\u6001\u58c1\u7eb8\u663e\u793a\u88ab\u8986\u76d6\u7684\u72b6\u6001\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win 7 \u5207\u6362\u4e3b\u9898\u65f6\uff0c\u58c1\u7eb8\u88ab\u8986\u76d6\u6389<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u4e0b\u56fe\u662f\u52a8\u753b\u8bbe\u7f6e\u9009\u9879\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win 8.1 \u52a8\u753b\u4f18\u5316\u8bbe\u7f6e<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5982\u4e0b\u9762\u52a8\u753b\u6240\u793a\uff0c\u5f53\u5173\u95ed\u52a8\u753b\u4f18\u5316\u540e\uff0c\u5c06\u5bfc\u81f4\u65e0\u6cd5\u8bbe\u7f6e\u52a8\u6001\u58c1\u7eb8\uff08\u4e0d\u77e5\u9053\u8c03\u8fc7\u4ec0\u4e48\u8bbe\u7f6e\u540e\u53c8\u53ef\u4ee5\u4f7f\u7528\u4e86\uff09\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u56e0\u52a8\u753b\u4f18\u5316\u5bfc\u81f4\u7684\u52a8\u6001\u58c1\u7eb8\u65e0\u6548\u7684\u60c5\u51b5<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   Windows \u6027\u80fd\u9009\u9879\uff1a\n  <\/p>\n<p>\n   \u6709\u4e9b\u673a\u5668\u4e0a\u4e3a\u4e86\u63d0\u9ad8\u6027\u80fd\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u53d6\u6d88\u9009\u4e2d\uff1a\u7a97\u53e3\u5185\u7684\u52a8\u753b\u63a7\u4ef6\u548c\u5143\u7d20\u3001\u5728\u6700\u5927\u5316\u548c\u6700\u5c0f\u5316\u65f6\u663e\u793a\u7a97\u53e3\u52a8\u753b\u3001\u4efb\u52a1\u680f\u4e2d\u7684\u52a8\u753b\u9009\u9879\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Windows \u6027\u80fd\u9009\u9879<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u6b64\u5916\uff0c\u5df2\u77e5 0x052C \u6d88\u606f\u7684\u5904\u7406\u5728\u4e0d\u540c\u7cfb\u7edf\u4e0a\u8868\u73b0\u4e0d\u4e00\u6837\uff1a\n  <\/p>\n<ul>\n<li>\n    \u5728 Vista \u4ee5\u53ca\u66f4\u65e9\u671f\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a<br \/>\n    <strong><br \/>\n     <span style=\"color:#0d0016\"><br \/>\n      \u4e0d\u53d7\u652f\u6301<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n    \uff1b\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \u5728\u90e8\u5206<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n    Win7 \u4e0a\u4e0d\u652f\u6301\u901a\u8fc7 0x052C \u6d88\u606f\u4f7f\u5f97\u684c\u9762\u53d8\u4e3a\u6d3b\u52a8\u684c\u9762\uff08\u4ea7\u751f\u4e24\u4e2a WorkerW\uff09\uff1b\n   <\/li>\n<li>\n    \u5df2\u77e5 Win7<br \/>\n    <strong><br \/>\n     <span style=\"color:#0d0016\"><br \/>\n      \u5bb6\u5ead\u666e\u901a\u7248\u548c\u5bb6\u5ead\u57fa\u7840\u7248<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n    \u7684 Aero \u4f18\u5316\u662f\u88ab\u5c4f\u853d\u7684\uff0c\u6682\u672a\u786e\u5b9a\u662f\u5426\u4f1a\u5bfc\u81f4\u5bf9\u52a8\u6001\u58c1\u7eb8\u8bbe\u8ba1\u4e0d\u652f\u6301\uff1b\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \u5728\u90e8\u5206<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n    Win 10 \u7cfb\u7edf\u4e0a 0x052C \u6d88\u606f\u53ea\u80fd\u4ea7\u751f\u4e00\u4e2a WorkerW \u7a97\u53e3\u6216\u8005\u65e0\u52a8\u4f5c\uff0c\u5982 Win10 1903 \u4e0d\u54cd\u5e94\u00a00x052C \u6d88\u606f (2023.10.19)\uff1b\n   <\/li>\n<li>\n    \u5df2\u77e5\u5916\u90e8\u6d4b\u8bd5\u6e20\u9053\u4e0a\u7684 Win11 24H2 \uff08\u8ba1\u5212\u4e8e 24 \u5e74 9 \u6708\u4efd\u5168\u9762\u63a8\u5e7f\uff09\u5df2\u7ecf\u5f00\u59cb\u53d6\u6d88 0x052C \u52a8\u753b\u673a\u5236\uff08\u5fae\u8f6f\u6539\u7528\u4e86\u6587\u672c\u6a21\u7cca\u6548\u679c\uff0c\u6240\u4ee5\u4e0d\u518d\u9700\u8981\u4e24\u4e2a WorkerW \u4e86\uff0c\u53ef\u80fd\u662f\u51fa\u4e8e\u51cf\u5c11\u7cfb\u7edf\u8d44\u6e90\u5f00\u9500\u8003\u8651\uff09\u3002\n   <\/li>\n<\/ul>\n<p>\n   \u5df2\u77e5 Win7 \u4e0a\u4e0d\u652f\u6301\u90e8\u5206\u7c7b\u578b\u00a00x052C \u6d88\u606f\uff0c\u5982 wParam \u4e3a 0xD \u5c06\u4f1a\u5f97\u5230\u4e0b\u56fe\u6240\u793a\u7684\u9519\u8bef\u4ee3\u7801\uff0c\u4f46\u652f\u6301 0x052C wParam \u548c lParam \u90fd\u7f3a\u7701\u4e3a 0\uff08\u53ef\u4ee5\u63d2\u5165\u52a8\u6001\u58c1\u7eb8\uff09\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win 7 \u5bb6\u5ead\u7248\u4e0d\u652f\u6301 0x052C \u6d88\u606f\u7684\u6269\u5c55\u529f\u80fd<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<h4 id=\"3.2%20%E5%AF%B9%E5%B7%B2%E7%9F%A5%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\">\n   <span style=\"color:#0d0016\"><br \/>\n    3.2 \u5bf9\u5df2\u77e5\u517c\u5bb9\u6027\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   \u89e3\u51b3\u65b9\u6848\uff1a\n  <\/p>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    \uff08\u7b49\u5f85\u7814\u7a76\u540e\u66f4\u65b0\uff09<br \/>\n   <\/span>\n  <\/p>\n<p>\n   1\uff09Win 7 \u5728\u4f7f\u7528 API \u5173\u95ed DWM \u7a97\u53e3\u5408\u6210\u529f\u80fd\u65f6\uff0c\u7cfb\u7edf\u4f1a\u5411\u6240\u6709\u9876\u7ea7\u7a97\u53e3\u53d1\u9001\u00a0WM_DWMCOMPOSITIONCHANGED \u6d88\u606f\uff0c\u5f53 WorkerW 2 \u63a5\u6536\u5230\u6b64\u6d88\u606f\u65f6\uff0c\u4f1a\u9500\u6bc1\u81ea\u8eab\uff0c\u5e76\u6700\u7ec8\u6062\u590d\u4f20\u7edf\u7684\u684c\u9762\u7a97\u53e3\u5c42\u6b21\uff0c\u5bfc\u81f4\u58c1\u7eb8\u7a97\u53e3\u7a81\u51fa\u4e14\u5931\u6548\uff1b\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u68c0\u6d4b\u7684\u6d88\u606f\u65e5\u5fd7<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5f53\u6ce8\u518c\u8868\u8bbe\u7f6e HKEY-Current-User\\Software\\Microsoft\\Windows\\DWM\\Composition \u4e3a 0 \u65f6\uff0cDWM \u7684\u7a97\u53e3\u5408\u6210\u4e5f\u4f1a\u7981\u7528\u3002\n  <\/p>\n<p>\n   \u76ee\u524d\u5df2\u7ecf\u521d\u6b65\u5b9e\u73b0\u52a8\u6001\u76d1\u6d4b DWM \u7a97\u53e3\u5408\u6210\u72b6\u6001\u7684\u4ee3\u7801\uff0c\u6548\u679c\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u52a8\u6001\u76d1\u6d4b Dwm \u7a97\u53e3\u5408\u6210\u662f\u5426\u542f\u7528\u5e76\u5c1d\u8bd5\u6062\u590d\u7684\u5de5\u5177\u6548\u679c<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   2\uff09Win11 24H2 \u5728\u5207\u6362\u80cc\u666f\u58c1\u7eb8\u6216\u8005\u4e3b\u9898\u65f6\uff0c\u7cfb\u7edf\u4f1a\u91cd\u5efa\u00a0WorkerW\u00a0\u7a97\u53e3\uff0c\u5bfc\u81f4\u4f5c\u4e3a\u5b50\u7a97\u53e3\u7684\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u88ab\u4e00\u5e76\u5173\u95ed\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u5f02\u5e38\uff0c\u4e25\u91cd\u65f6 DWM \u53ef\u80fd\u4f1a\u7eff\u5c4f\u62a5\u9519\u3002\u7ecf\u8fc7\u7814\u7a76\uff0c\u53d1\u73b0\u4e3b\u8981\u662fWorkerW \u63a5\u6536\u5230\u4e86 WM_SETTINGCHANGE\uff080x1A\uff09\u4e14 wParam == SPI_SETDESKTOPWALLPAPER\uff080x14\uff09\uff0clParam \u4e3a 0 \u7684\u6d88\u606f\uff0c\u8fd9\u4e00\u822c\u662f\u7531 SystemParametersInfo \u51fd\u6570\u8c03\u7528\u5f15\u8d77\u7684\u3002\u968f\u540e\u53d1\u9001 0x90 \u79c1\u6709\u6d88\u606f\u7ed9\u81ea\u8eab\uff0c\u6700\u7ec8\u7531\u7a97\u53e3\u8c03\u7528 WM_DESTROY \u548c PostQuitMessage(0) \u9000\u51fa\u7a97\u53e3\u548c GUI \u7ebf\u7a0b\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win11 24H2 \u7a97\u53e3\u91cd\u5efa\u95ee\u9898<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u76ee\u524d\u60f3\u5230\u7684\u65b9\u6848\u662f\u7a97\u53e3\u5b50\u7c7b\u5316\u6216\u8005 HOOK \u62e6\u622a\u8fd9\u4e24\u4e2a\u7279\u6b8a\u6d88\u606f\uff0c\u76f4\u63a5\u8fd4\u56de 0 \u6765\u7ed5\u8fc7\u3002\n  <\/p>\n<p>\n   3\uff09\u5728\u4fee\u6539\u7a97\u53e3\u58c1\u7eb8\u65f6\u5019\uff0c\u4f1a\u53d1\u9001 WM_ERASEBKGND \u548c WM_PAINT \u6d88\u606f\u7ed9 WorkerW \u7a97\u53e3\uff0c\u9700\u8981\u901a\u8fc7\u7a97\u53e3\u5b50\u7c7b\u5316\u62e6\u622a\u6b64\u6d88\u606f\uff0c\u6765\u907f\u514d\u56fe\u8c61\u88ab\u77ed\u6682\u7684\u52a8\u753b\uff08\u6709\u65f6\u5019\u65f6\u95f4\u5f88\u957f\uff09\u8986\u76d6\u3002\n  <\/p>\n<p>\n   \u5df2\u77e5\u00a0WH_CALLWNDPROC\u00a0\u3001WH_CALLWNDPROCRET \u548c\u00a0WH_GETMESSAGE \u94a9\u5b50\u5747\u4e0d\u8d77\u4f5c\u7528\u3002\u6240\u4ee5\uff0c\u6700\u4f73\u65b9\u6848\u5c31\u662f\u7a97\u53e3\u5b50\u7c7b\u5316\u4e86\u3002\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     WH_CALLWNDPROC\u00a0\u53ea\u80fd\u5728\u7a97\u53e3\u56de\u8c03\u63a5\u53d7\u6d88\u606f\u4e4b\u524d\u83b7\u53d6\u6d88\u606f\u4f46\u4e0d\u80fd\u4fee\u6539\u6d88\u606f\u4f20\u9012\u94fe\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     WH_CALLWNDPROCRET \u7a97\u53e3\u5904\u7406\u5b8c\u6d88\u606f\u540e\u5c06\u5904\u7406\u7ed3\u679c\u901a\u77e5\u7ed9\u6ce8\u518c\u6b64\u94a9\u5b50\u7684\u7ebf\u7a0b\uff0c\u4e0d\u80fd\u4fee\u6539\u6d88\u606f\u4f20\u9012\u94fe\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     WH_GETMESSAGE \u53ea\u80fd\u62e6\u622a\u548c\u4fee\u6539\u901a\u8fc7 GetMessage \u6216 PeekMessage \u5904\u7406\u7684\u6d88\u606f\u961f\u5217\u6d88\u606f\u3002WM_CREATE\u3001WM_PAINT\u3001WM_COPYDATA\u3001WM_ERASEBKGND \u7b49\u76f4\u63a5\u901a\u8fc7\u540c\u6b65\u5206\u6d3e\u53d1\u9001\u7684\u6d88\u606f\u662f\u76f4\u63a5\u53d1\u9001\u7ed9\u7a97\u53e3\u8fc7\u7a0b\u7684\uff0c\u800c\u4e0d\u662f\u901a\u8fc7\u6d88\u606f\u961f\u5217\u4f20\u9012\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6240\u4ee5\u81ea\u7136\u6ca1\u6709\u5408\u9002\u7684 Win32 Hook \u53ef\u4ee5\u62e6\u622a\u5e76\u4fee\u6539\u6211\u4eec\u9700\u8981\u7684\u6d88\u606f\uff0c\u7531\u6b64\u770b\u6765\u53ea\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff081\uff09\u901a\u8fc7\u7a97\u53e3\u5b50\u7c7b\u5316\u4fee\u6539\u7279\u5b9a\u7a97\u53e3\u5bf9\u5e94\u7684\u7a97\u53e3\u56de\u8c03\uff08\u5bb9\u6613\u5b9e\u73b0\uff09\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff082\uff09\u901a\u8fc7\u9006\u5411\u5de5\u7a0b\u5bf9\u672a\u5bfc\u51fa\u7684\u7a97\u53e3\u56de\u8c03\u51fd\u6570\u8fdb\u884c Inline\u00a0Hook\uff0c\u4fee\u6539\u7a97\u53e3\u8fc7\u7a0b\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u76f8\u5173\u6587\u732e\u53c2\u8003\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <a href=\"https:\/\/stackoverflow.com\/questions\/20339124\/why-does-getmessage-not-process-wm-powerbroadcast-messages\" rel=\"nofollow\" title=\"\u4e3a\u4ec0\u4e48 GetMessage \u4e0d\u5904\u7406WM_POWERBROADCAST\u6d88\u606f\uff1f- stackoverflow\"><br \/>\n     \u4e3a\u4ec0\u4e48 GetMessage \u4e0d\u5904\u7406WM_POWERBROADCAST\u6d88\u606f\uff1f- stackoverflow<br \/>\n    <\/a>\n   <\/p>\n<\/blockquote>\n<p>\n   <span style=\"color:#fe2c24\"><br \/>\n    2024.07.10 \u66f4\u65b0\u2014\u2014\u76ee\u524d\u5df2\u7ecf\u7f16\u5199\u4e86\u4e00\u4e2a\u7a97\u53e3\u5b50\u7c7b\u5316\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u672a\u6765\u5c06\u4f1a\u628a\u7a97\u53e3\u5b50\u7c7b\u5316\u6280\u672f\u8fd0\u7528\u4e8e\u6b64\u68c0\u6d4b\u3002\u793a\u4f8b\u4ee3\u7801\u89c1\u6587\u7ae0\uff1a<br \/>\n    <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/140334106\" title=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/140334106\"><br \/>\n     https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/140334106<br \/>\n    <\/a><br \/>\n    \u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   4\uff09<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7\"><br \/>\n     \u7a97\u53e3\u8986\u76d6\u68c0\u6d4b\uff1a<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u5f53\u5168\u5c4f\u7a97\u53e3\u906e\u6321\u684c\u9762\u65f6\u5019\uff0c\u6682\u505c\u52a8\u6001\u58c1\u7eb8\u3002\u8be5\u68c0\u6d4b\u901a\u8fc7\u591a\u4e2a\u68c0\u6d4b\u903b\u8f91\u548c\u9003\u9038\u89c4\u5219\u6765\u5b8c\u6210\u3002\u73b0\u5df2\u66f4\u65b0\u5728\u4e2a\u4eba\u535a\u5ba2\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5168\u5c4f\u7a97\u53e3\u68c0\u6d4b\u7814\u7a76<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   5\uff09\u68c0\u6d4b\u7279\u6b8a\u7cfb\u7edf\u72b6\u6001\n  <\/p>\n<p>\n   <span style=\"color:#956fe7\"><br \/>\n    <strong><br \/>\n     \u7761\u7720\u65f6\u6682\u505c\u52a8\u6001\u58c1\u7eb8\uff1a<br \/>\n    <\/strong><br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u68c0\u6d4b\u7cfb\u7edf\u7761\u7720\u72b6\u6001\u7684\u65b9\u6cd5\u662f\u6ce8\u518c\u7cfb\u7edf\u901a\u77e5\u56de\u8c03\uff0c\u5728 Win8 \u4ee5\u4e0a\u4f7f\u7528\u00a0PowerRegisterSuspendResumeNotification \u901a\u77e5\u7ebf\u7a0b\uff1b\u5728 Win7 \u4e0a\u5904\u7406 WM_POWERBROADCAST \u6d88\u606f\u3002\n  <\/p>\n<p>\n   \u9002\u7528\u4e8e Win 8 \u53ca\u4ee5\u4e0a\u7cfb\u7edf\u7684\u7761\u7720\u72b6\u6001\u68c0\u6d4b\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;iostream&gt;\n#include &lt;powrprof.h&gt;\n\n#pragma comment(lib, \"Powrprof.lib\")\n\n\nstd::wstring GetDayOfWeek(int dayOfWeek) {\n    switch (dayOfWeek) {\n    case 0: return L\"Sunday\";\n    case 1: return L\"Monday\";\n    case 2: return L\"Tuesday\";\n    case 3: return L\"Wednesday\";\n    case 4: return L\"Thursday\";\n    case 5: return L\"Friday\";\n    case 6: return L\"Saturday\";\n    default: return L\"\";\n    }\n}\n\nstd::wstring GetCurrentDateTime() {\n    SYSTEMTIME systemTime;\n    GetLocalTime(&amp;systemTime);\n\n    wchar_t dateTimeBuffer[150] = { 0 };\n    std::wstring dayOfWeek = GetDayOfWeek(systemTime.wDayOfWeek);\n    swprintf_s(dateTimeBuffer, L\"%04d-%02d-%02d %s %02d:%02d:%02d\",\n        systemTime.wYear, systemTime.wMonth, systemTime.wDay,\n        dayOfWeek.c_str(),\n        systemTime.wHour, systemTime.wMinute, systemTime.wSecond);\n\n    return std::wstring(dateTimeBuffer);\n}\n\n\nULONG CALLBACK DeviceCallback(PVOID Context, ULONG Type, PVOID Setting)\n{\n    if (Type == PBT_APMSUSPEND)\n    {\n        std::wstring currentDateTime = GetCurrentDateTime();\n        std::wcout &lt;&lt; \"Sleeping at time: \" &lt;&lt; currentDateTime &lt;&lt; std::endl;\n    }\n    if (Type == PBT_APMRESUMESUSPEND)\n    {\n        std::wstring currentDateTime = GetCurrentDateTime();\n        std::wcout &lt;&lt; \"Awaking at time: \" &lt;&lt; currentDateTime &lt;&lt; std::endl;\n    }\n    return ERROR_SUCCESS;\n}\n\nint main()\n{\n    HPOWERNOTIFY g_power_notify_handle = NULL;\n    DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS params = { 0 };\n    params.Callback = DeviceCallback;\n    params.Context = 0;\n    PowerRegisterSuspendResumeNotification(DEVICE_NOTIFY_CALLBACK, &amp;params, &amp;g_power_notify_handle);\n    MSG msg;\n    while (GetMessageW(&amp;msg, NULL, 0, 0)) {\n        TranslateMessage(&amp;msg);\n        DispatchMessageW(&amp;msg);\n    }\n    PowerUnregisterSuspendResumeNotification(g_power_notify_handle);\n    return 0;\n}<\/code><\/pre>\n<p>\n   <strong><br \/>\n    <span style=\"color:#956fe7\"><br \/>\n     \u68c0\u6d4b\u4f11\u7720\u7684\u65b9\u6cd5\uff08\u4f11\u7720\u68c0\u6d4b\u65b9\u6cd5\u6ca1\u6709\u9a8c\u8bc1\u8fc7\u662f\u5426\u53ef\u884c\uff09\uff1a<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u4f7f\u7528<br \/>\n   <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/aa372675%28v=vs.85%29.aspx\" rel=\"nofollow\" title=\"CallNtPowerInformation\"><br \/>\n    CallNtPowerInformation<br \/>\n   <\/a><br \/>\n   \u5e76\u6307\u5b9a InformationLevel \u4e3a SystemPowerCapabilities\uff0clpOutputBuffer \u7f13\u51b2\u533a\u63a5\u6536\u5305\u542b\u5f53\u524d\u7cfb\u7edf\u7535\u6e90\u529f\u80fd\u7684 SYSTEM_POWER_CAPABILITIES \u7ed3\u6784\u3002\u4ece SYSTEM_POWER_CAPABILITIES \u6570\u636e\u7ed3\u6784\u4e2d\u68c0\u67e5\u6210\u5458 HiberFilePresent \u7684\u503c<br \/>\n   <code><br \/>\n    \uff0c<br \/>\n   <\/code><br \/>\n   \u5982\u679c\u6b64\u6210\u5458\u4e3aTRUE\uff0c\u5219\u5b58\u5728\u7cfb\u7edf\u4f11\u7720\u6587\u4ef6\u3002\n  <\/p>\n<p>\n   <span style=\"color:#956fe7\"><br \/>\n    <strong><br \/>\n     \u68c0\u6d4b\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u662f\u5426\u5df2\u7ecf\u542f\u7528\uff1a<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u901a\u8fc7\u6ce8\u518c\u8868\u8def\u5f84 [HKEY_CURRENT_USER\\Control Panel\\Desktop] \u68c0\u67e5 SCRNSAVE.EXE \u503c\u9879\u4ee5\u4fbf\u4e8e\u83b7\u53d6\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u7684\u8def\u5f84\uff0c\u7136\u540e\u68c0\u6d4b\u5f53\u524d\u6d3b\u52a8\u8fdb\u7a0b\u662f\u5426\u6709\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u3002\u4f46\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6709\u4e24\u79cd\u60c5\u51b5\u4e0b\u68c0\u6d4b\u4e0d\u51c6\u786e\u4e00\u662f\u6b63\u5728\u6253\u5f00\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u8bbe\u7f6e\uff0c\u6b64\u65f6\u5e94\u8be5\u68c0\u67e5 Rundll32.exe \u662f\u5426\u6b63\u5728\u542f\u52a8\uff0c\u5982\u679c\u5176\u547d\u4ee4\u884c\u53c2\u6570\u4e3a &#8221; shell32.dll,Control_RunDLL desk.cpl,ScreenSaver,@ScreenSaver&#8221; \u5219\u8ba4\u4e3a\u5f53\u524d\u5728\u8c03\u6574\u8bbe\u7f6e\u3002\u53e6\u5916\u4e00\u79cd\u60c5\u51b5\u5c31\u662f\u9700\u8981\u68c0\u6d4b\u7528\u6237\u7a7a\u95f2\u65f6\u95f4\uff0c\u68c0\u67e5\u00a0ScreenSaveTimeOut \u548c ScreenSaveActive (\u4e3a 1)\u503c\u9879\uff0c\u00a0ScreenSaveTimeOut \u662f\u6309\u7167\u79d2\u6765\u8bb0\u5f55\u7684\u8d85\u65f6\u65f6\u95f4\uff08\u7cfb\u7edf\u8bbe\u7f6e\u4e2d\u4ee5\u5206\u949f\u6765\u663e\u793a\uff0c\u6bd4\u5982 5 \u5206\u949f\u5c31\u662f 300 \u79d2\uff09\u3002\u7136\u540e\u901a\u8fc7\u4ee5\u4e0b\u7b97\u6cd5\u68c0\u6d4b\u7a7a\u95f2\u65f6\u95f4\uff1a\n  <\/p>\n<p>\n   \u4e3a\u4e86\u786e\u5b9a\u7528\u6237\u7a7a\u95f2\u7684\u65f6\u95f4\uff0c\u7cfb\u7edf\u63d0\u4f9b GetLastInputInfo API\u8c03\u7528\u3002\u8981\u5728\u7528\u6237\u7a7a\u95f2\u4e86\u6307\u5b9a\u7684\u65f6\u95f4\u540e\u5f97\u5230\u901a\u77e5\uff0c\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u4f1a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n  <\/p>\n<ol>\n<li>\n    \u8bbe\u7f6e\u5177\u6709\u6307\u5b9a\u8d85\u65f6\u7684\u8ba1\u65f6\u5668\uff08SetTimer\uff09\uff1b\n   <\/li>\n<li>\n    \u5f53\u8ba1\u65f6\u5668\u8d85\u65f6\u65f6\uff0c\u8ba1\u7b97 GetTickCount \u548c GetLastInputInfo \u4e4b\u95f4\u7684\u5dee\u503c\uff08dwCurrent-dwLastInput \u53ef\u9760\u5730\u8ba1\u7b97\u81ea\u4e0a\u6b21\u7528\u6237\u8f93\u5165\u4ee5\u6765\u7ecf\u8fc7\u7684\u65f6\u95f4\uff0c\u5373\u4f7f GetTickCount \u5faa\u73af\u56de\u5230 0\uff1b\u65e0\u7b26\u53f7\u6574\u6570\u6ea2\u51fa\u5728 C \u548c C++ \u4e2d\u6709\u5f88\u597d\u7684\u5b9a\u4e49\uff09\uff0c\u5e76\u68c0\u67e5<br \/>\n    <em id=\"__mceDel\"><br \/>\n     powercfg -requests<br \/>\n    <\/em><br \/>\n    \u8fd4\u56de\u503c\u662f\u5426\u4e3a\u7a7a\uff0c\u6765\u5224\u65ad\u662f\u5426\u5c06\u8fdb\u5165\u5c4f\u5e55\u4fdd\u62a4\u6216\u7761\u7720\uff1b\n   <\/li>\n<li>\n    \u5982\u679c\u5dee\u503c\u5c0f\u4e8e\u6307\u5b9a\u7684\u8d85\u65f6\u503c\uff0c\u8bf7\u4ece\u6b65\u9aa4 1 \u5f00\u59cb\uff0c\u4f7f\u7528\u5269\u4f59\u7684\u8d85\u65f6\u65f6\u95f4\u8bbe\u7f6e\u8ba1\u65f6\u5668\uff1b\u5426\u5219\uff0c\u5728\u6ca1\u6709\u7528\u6237\u8f93\u5165\u7684\u60c5\u51b5\u4e0b\u8d85\u65f6\u5df2\u7ecf\u8fc7\u53bb\uff0c\u6240\u4ee5\u5728\u7528\u6237\u7a7a\u95f2\u6307\u5b9a\u7684\u65f6\u95f4\u540e\uff0c\u8bf7\u6267\u884c\u7a0b\u5e8f\u9700\u8981\u6267\u884c\u7684\u4efb\u4f55\u64cd\u4f5c\uff0c\u4f8b\u5982\u505c\u6b62\u52a8\u6001\u58c1\u7eb8\uff08\u91ca\u653e\u8d44\u6e90\uff09\u3002\n   <\/li>\n<\/ol>\n<p>\n   <span style=\"color:#956fe7\"><br \/>\n    <strong><br \/>\n     \u5224\u65ad\u663e\u793a\u5668\u662f\u5426\u5df2\u7ecf\u5173\u95ed\uff1a<br \/>\n    <\/strong><br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u5f53\u663e\u793a\u5668\u5173\u95ed\u65f6\uff0c\u6682\u505c\u64ad\u653e\u52a8\u6001\u58c1\u7eb8\u3002\u901a\u8fc7\u6ce8\u518c PBT_POWERSETTINGCHANGE \u4e8b\u4ef6\u6765\u83b7\u53d6\u76f8\u5e94\u7684\u4fe1\u606f\uff1a\n  <\/p>\n<pre><code class=\"language-cpp\">#include  &lt;windows.h&gt;\n#include &lt;iostream&gt;\nusing namespace std;\n \nLRESULT CALLBACK WindowProc(\n\t_In_  HWND hwnd,\n\t_In_  UINT uMsg,\n\t_In_  WPARAM wParam,\n\t_In_  LPARAM lParam\n);\nHWND createMsgWin() {\n\tHINSTANCE lvhInstance;\n\tlvhInstance = GetModuleHandle(NULL);  \/\/\u83b7\u53d6\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u6216\u52a8\u6001\u94fe\u63a5\u5e93\u7684\u6a21\u5757\u53e5\u67c4  \n\tWNDCLASS lvwcCls;\n\tlvwcCls.cbClsExtra = 0;\n\tlvwcCls.cbWndExtra = 0;\n\tlvwcCls.hCursor = LoadCursor(lvhInstance, IDC_ARROW);  \/\/\u9f20\u6807\u98ce\u683c  \n\tlvwcCls.hIcon = LoadIcon(lvhInstance, IDI_APPLICATION);    \/\/\u56fe\u6807\u98ce\u683c  \n\tlvwcCls.lpszMenuName = NULL; \/\/\u83dc\u5355\u540d  \n\tlvwcCls.style = CS_HREDRAW | CS_VREDRAW; \/\/\u7a97\u53e3\u7684\u98ce\u683c  \n\tlvwcCls.hbrBackground = (HBRUSH)COLOR_WINDOW;    \/\/\u80cc\u666f\u8272  \n\tlvwcCls.lpfnWndProc = WindowProc;    \/\/\u3010\u5173\u952e\u3011\u91c7\u7528\u81ea\u5b9a\u4e49\u6d88\u606f\u5904\u7406\u51fd\u6570\uff0c\u4e5f\u53ef\u4ee5\u7528\u9ed8\u8ba4\u7684DefWindowProc  \n\tlvwcCls.lpszClassName = _T(\"RenderWindow\");  \/\/\u3010\u5173\u952e\u3011\u8be5\u7a97\u53e3\u7c7b\u7684\u540d\u79f0  \n\tlvwcCls.hInstance = lvhInstance;   \/\/\u3010\u5173\u952e\u3011\u8868\u793a\u521b\u5efa\u8be5\u7a97\u53e3\u7684\u7a0b\u5e8f\u7684\u8fd0\u884c\u5b9e\u4f53\u4ee3\u53f7  \n \n\tRegisterClass(&amp;lvwcCls);\n \n\tHWND lvhwndWin = CreateWindow(\n\t\t_T(\"RenderWindow\"),           \/\/\u3010\u5173\u952e\u3011\u4e0a\u9762\u6ce8\u518c\u7684\u7c7b\u540dlpszClassName\uff0c\u8981\u5b8c\u5168\u4e00\u81f4    \n\t\tL\"Zombie\",  \/\/\u7a97\u53e3\u6807\u9898\u6587\u5b57    \n\t\tWS_OVERLAPPEDWINDOW, \/\/\u7a97\u53e3\u5916\u89c2\u6837\u5f0f    \n\t\t0,             \/\/\u7a97\u53e3\u76f8\u5bf9\u4e8e\u7236\u7ea7\u7684X\u5750\u6807    \n\t\t0,             \/\/\u7a97\u53e3\u76f8\u5bf9\u4e8e\u7236\u7ea7\u7684Y\u5750\u6807    \n\t\t30,                \/\/\u7a97\u53e3\u7684\u5bbd\u5ea6    \n\t\t20,                \/\/\u7a97\u53e3\u7684\u9ad8\u5ea6    \n\t\tNULL,               \/\/\u6ca1\u6709\u7236\u7a97\u53e3\uff0c\u4e3aNULL    \n\t\tNULL,               \/\/\u6ca1\u6709\u83dc\u5355\uff0c\u4e3aNULL    \n\t\tlvhInstance,          \/\/\u5f53\u524d\u5e94\u7528\u7a0b\u5e8f\u7684\u5b9e\u4f8b\u53e5\u67c4    \n\t\tNULL);              \/\/\u6ca1\u6709\u9644\u52a0\u6570\u636e\uff0c\u4e3aNULL    \n \n\t\t\t\t\t\t\t\/\/\u53bb\u6807\u9898\u680f  \n\t\n\treturn lvhwndWin;\n}\n \nLRESULT CALLBACK WindowProc(\n\t_In_  HWND hwnd,\n\t_In_  UINT uMsg,\n\t_In_  WPARAM wParam,\n\t_In_  LPARAM lParam\n)\n{\n\t\/\/cout &lt;&lt; \"MSG:\" &lt;&lt; uMsg &lt;&lt; \",wParam:\" &lt;&lt; wParam &lt;&lt; \",lParam:\" &lt;&lt; lParam &lt;&lt; endl;\n\tswitch (uMsg)\n\t{\n\t\t\n\t\tcase WM_POWERBROADCAST:\n\t\t{\n\t\t\tif (wParam == PBT_POWERSETTINGCHANGE) {\n\t\t\t\tPOWERBROADCAST_SETTING* lvpsSetting = (POWERBROADCAST_SETTING*)lParam;\n\t\t\t\tbyte lvStatus = *(lvpsSetting-&gt;Data);\n\t\t\t\tif (lvStatus != 0) {\n\t\t\t\t\tcout &lt;&lt; \"Monitor is turn on\" &lt;&lt; endl;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcout &lt;&lt; \"Monitor is turn off\" &lt;&lt; endl;\n\t\t\t\t}\n\t\t\t\t\/\/cout &lt;&lt; (int)lvStatus &lt;&lt; endl;\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\t}\t\t\n\t}\n\treturn DefWindowProc(hwnd, uMsg, wParam, lParam);\n}\nHWND mhMsgRec;\n \nBOOL WINAPI ConsoleHandler(DWORD pvdwMsgType)\n{\n\tif (pvdwMsgType == CTRL_C_EVENT)\n\t{\n\t\tPostMessage(mhMsgRec, WM_DESTROY, 0, 0);\n\t\treturn TRUE;\n\t}\n\telse if (pvdwMsgType == CTRL_CLOSE_EVENT)\n\t{\n\t\tPostMessage(mhMsgRec, WM_DESTROY, 0, 0);\n\t\treturn TRUE;\n\t}\n\treturn FALSE;\n}\n \nint main()\n{\n \n\tmhMsgRec = createMsgWin();\/\/\u8fd9\u4e2a\u51fd\u6570\u4e5f\u662fdll\u91cc\u7684\uff0c\u5f97\u5230\u63a7\u5236\u53f0\u7684\u53e5\u67c4\n\tHPOWERNOTIFY lvhpNotify = RegisterPowerSettingNotification(mhMsgRec, &amp;GUID_CONSOLE_DISPLAY_STATE, DEVICE_NOTIFY_WINDOW_HANDLE);\n\tSetConsoleCtrlHandler(ConsoleHandler, TRUE);\n\tbool lvbRet;\n\tMSG lvMSG;\n\twhile ((lvbRet = GetMessage(&amp;lvMSG, NULL, 0, 0)) != 0)\n\t{\t\t\n\t\tTranslateMessage(&amp;lvMSG);\n\t\tDispatchMessage(&amp;lvMSG);\n\t\tif (lvMSG.message == WM_DESTROY) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tUnregisterPowerSettingNotification(lvhpNotify);\n\tCloseWindow(mhMsgRec);\n\treturn 0;\n}\n <\/code><\/pre>\n<p>\n   \u76f8\u5173\u6587\u732e\uff1a\n  <\/p>\n<ul>\n<li>\n    <a href=\"https:\/\/blog.csdn.net\/qq_39529180\/article\/details\/100100604\" title=\"\u68c0\u6d4b\u8ba1\u7b97\u673a\u662f\u5426\u5904\u4e8e\u7761\u7720\u6a21\u5f0f_c++ \u5224\u65ad\u53f0\u5f0f\u673a\u4f11\u7720-CSDN\u535a\u5ba2\"><br \/>\n     \u68c0\u6d4b\u8ba1\u7b97\u673a\u662f\u5426\u5904\u4e8e\u7761\u7720\u6a21\u5f0f_c++ \u5224\u65ad\u53f0\u5f0f\u673a\u4f11\u7720-CSDN\u535a\u5ba2<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/www.cnblogs.com\/chaichengxun\/p\/17607834.html\" rel=\"nofollow\" title=\"Windows c++\u68c0\u6d4b\u7b14\u8bb0\u672c\u662f\u5426\u5904\u4e8e\u7761\u7720\u72b6\u6001 - \u67f4\u627f\u8bad - \u535a\u5ba2\u56ed (cnblogs.com)\"><br \/>\n     Windows c++\u68c0\u6d4b\u7b14\u8bb0\u672c\u662f\u5426\u5904\u4e8e\u7761\u7720\u72b6\u6001 &#8211; \u67f4\u627f\u8bad &#8211; \u535a\u5ba2\u56ed (cnblogs.com)<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/www.cnblogs.com\/smart-zihan\/p\/18094586\" rel=\"nofollow\" title=\"\u83b7\u53d6\u663e\u793a\u5668\u72b6\u6001\uff08\u6355\u83b7\u7184\u5c4f\/\u4eae\u5c4f\uff09 - o\u4e91\u6de1\u98ce\u8f7bo - \u535a\u5ba2\u56ed (cnblogs.com)\"><br \/>\n     \u83b7\u53d6\u663e\u793a\u5668\u72b6\u6001\uff08\u6355\u83b7\u7184\u5c4f\/\u4eae\u5c4f\uff09 &#8211; o\u4e91\u6de1\u98ce\u8f7bo &#8211; \u535a\u5ba2\u56ed (cnblogs.com)<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/cloud.tencent.com\/developer\/ask\/sof\/102991951\/answer\/111092356\" rel=\"nofollow\" title=\"\u68c0\u6d4b\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u662f\u5426\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u6216\u662f\u5426\u5df2\u9501\u5b9a\u5c4f\u5e55-\u817e\u8baf\u4e91\"><br \/>\n     \u68c0\u6d4b\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u662f\u5426\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u6216\u662f\u5426\u5df2\u9501\u5b9a\u5c4f\u5e55-\u817e\u8baf\u4e91<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/blog.csdn.net\/github_37567324\/article\/details\/79977709\" title=\"SystemParametersInfo\u83b7\u53d6\u5c4f\u5e55\u4fdd\u62a4\u59cb\u7ec8\u4e3aTRUE\u89e3\u51b3\u529e\u6cd5-CSDN\u535a\u5ba2\"><br \/>\n     SystemParametersInfo\u83b7\u53d6\u5c4f\u5e55\u4fdd\u62a4\u59cb\u7ec8\u4e3aTRUE\u89e3\u51b3\u529e\u6cd5-CSDN\u535a\u5ba2<br \/>\n    <\/a>\n   <\/li>\n<li>\n    <a href=\"https:\/\/stackoverflow.com\/questions\/71723601\/how-to-determine-how-much-time-a-windows-user-is-idle\" rel=\"nofollow\" title=\"How to determine how much time a Windows user is idle? - Stack Overflow\"><br \/>\n     How to determine how much time a Windows user is idle? &#8211; Stack Overflow<br \/>\n    <\/a>\n   <\/li>\n<\/ul>\n<p>\n   \u5176\u4ed6\u90e8\u5206\u7684\u89e3\u51b3\u65b9\u6848\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5373\u5c06\u66f4\u65b0\u76f8\u5173\u5b50\u65b9\u6848<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<h3 id=\"3.%20%E5%AE%8C%E6%95%B4%E4%BB%A3%E7%A0%81%E4%BB%A5%E5%8F%8A%E6%B5%8B%E8%AF%95%E6%88%AA%E5%9B%BE\">\n   <strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     4. \u5b8c\u6574\u4ee3\u7801\u4ee5\u53ca\u6d4b\u8bd5\u622a\u56fe<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n  <\/h3>\n<h4 id=\"3.1%20%E4%BB%A3%E7%A0%81\">\n   <span style=\"color:#0d0016\"><br \/>\n    4.1 \u4ee3\u7801<br \/>\n   <\/span><br \/>\n  <\/h4>\n<blockquote>\n<p>\n    <strong><br \/>\n     <span style=\"color:#fe2c24\"><br \/>\n      \u63d0\u793a<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff081\uff09\u6709\u5173\u9000\u51fa\u65f6\u56fe\u6807\u7a97\u53e3\u4e0a\u53ef\u80fd\u5b58\u5728\u6b8b\u5f71\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u6ca1\u6709\u5199\u5165\u5230\u4e0b\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u5177\u4f53\u8bf4\u660e\u8bf7\u53c2\u8003 \u201c2.3\u00a0\u00a0\u89e3\u51b3\u9000\u51fa\u7a0b\u5e8f\u65f6\u7a97\u53e3\u6b8b\u5f71\u95ee\u9898\u201d\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff082\uff09\u6d4b\u8bd5\u4ee3\u7801\u4ec5\u4ec5\u662f\u4e3a\u4e86\u6f14\u793a\u5d4c\u5165\u7a97\u53e3\uff0c\u800c\u4f7f\u7528 Win32 API \u76f4\u63a5\u521b\u5efa\u4e86\u4e00\u4e2a\u7a7a\u767d\u7a97\u53e3\u793a\u4f8b \u3002<br \/>\n     <s><br \/>\n      \u5b9e\u9645\u5f00\u53d1\u4e2d\u5efa\u8bae\u76f4\u63a5\u4ee5 WebView2 \u7a97\u53e3\u6216\u8005 WebGL \u7a97\u53e3\u4f5c\u4e3a\u5d4c\u5165\u684c\u9762\u7684\u7a97\u53e3\uff1b<br \/>\n     <\/s><br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff083\uff09\u68c0\u67e5\u5e76\u91cd\u542f\u670d\u52a1\u7684\u90e8\u5206\u9700\u8981\u63d0\u5347\u8fdb\u7a0b\u6743\u9650\u81f3\u7ba1\u7406\u5458\u6743\u9650\uff0c\u53ef\u4ee5\u5728\u7a0b\u5e8f\u6e05\u5355\u4e2d\u8bbe\u7f6e\u8be5\u9009\u9879\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff084\uff09\u76ee\u524d\u68c0\u67e5\u5e76\u91cd\u542f\u670d\u52a1\u7684\u4ee3\u7801\u4e3a\u4e86\u65b9\u4fbf\u89e3\u91ca\uff0c<br \/>\n     <s><br \/>\n      \u5e76\u672a\u91c7\u7528 SCM \u7684 API \u800c\u662f\u76f4\u63a5\u7528\u4e86\u547d\u4ee4\u884c sc \u547d\u4ee4\uff0c\u8fd9\u6837\u5b50\u7684\u68c0\u6d4b\u4e0d\u592a\u7a33\u5b9a\uff0c\u5b9e\u9645\u8fc7\u7a0b\u9700\u8981\u4fee\u6539\u5b8c\u5584<br \/>\n     <\/s><br \/>\n     \uff08\u6b63\u6587\u5df2\u66f4\u65b0\uff0c\u4f46\u6ca1\u6709\u6574\u5408\u5230\u4e0b\u9762\u4ee3\u7801\u4e2d\uff09\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff085\uff09\u4ee3\u7801\u4e2d\u6682\u4e0d\u80fd\u54cd\u5e94\u663e\u793a\u5668\u66f4\u6539\u548c\u5206\u8fa8\u7387\u66f4\u6539\u60c5\u51b5\uff0c\u4e0d\u80fd\u8ddf\u968f\u7cfb\u7edf\u684c\u9762\u77e9\u5f62\u5c3a\u5bf8\u7684\u53d8\u5316\u53ca\u65f6\u540c\u6b65\u4fee\u6539\u5c3a\u5bf8\uff1b<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff086\uff09<br \/>\n    <\/span><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u4ee5\u4e0b\u4ee3\u7801\u5df2\u7ecf\u5b58\u5728 Windows \u7cfb\u7edf\u4f9d\u8d56\u6027\u548c\u517c\u5bb9\u95ee\u9898\u3002\u7531\u4e8e\u65f6\u95f4\u95ee\u9898\u5c06\u5728\u672a\u6765\u4fee\u590d\uff0c\u9700\u8981\u4e86\u89e3\u5177\u4f53\u60c5\u51b5\u7684\uff0c\u8bf7\u5173\u6ce8 3.1 (1.1), 3.2 (2.3), 3.3 (3.1) \u548c 3.3 (3.2) \u5c0f\u8282<br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff1b\uff08\u6240\u4ee5\u4e0d\u8981\u76f4\u63a5\u590d\u5236\u6216\u8005\u8f6c\u8f7d\u4e0b\u9762\u4ee3\u7801\u4e86\uff0c\u5982\u6709\u60c5\u51b5\u8bf7\u8bc4\u8bba\u533a\u4ea4\u6d41\u6216\u79c1\u4fe1\uff09<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u5b8c\u6574\u4ee3\u7801\u4f7f\u7528 Visual Studio 2022 \u7f16\u8bd1\uff0c\u5728 Win 11 23H2 \u4ee5\u53ca Win 7 ~ Win 10 \u90e8\u5206\u7248\u672c\u4e0a\u6d4b\u8bd5\u901a\u8fc7\uff0c\u4f46\u53ef\u80fd\u4ecd\u7136\u4e0d\u652f\u6301\u90e8\u5206\u7cfb\u7edf\uff0c\u5177\u4f53\u89c1\u672c\u6587\u4e2d\u7684<br \/>\n   <strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \u517c\u5bb9\u6027\u7591\u96be\u89e3\u7b54<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u5185\u5bb9\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;iostream&gt;\n#include &lt;windows.h&gt;\n#include &lt;string&gt;\n#include &lt;tchar.h&gt;\n#include &lt;time.h&gt;\n#include &lt;shellscalingapi.h&gt;\n#include &lt;tlhelp32.h&gt;\n\n#pragma comment(lib, \"Shcore.lib\")\n\n\/\/\u9690\u85cfDOS\u9ed1\u7a97\u53e3\n\/\/#pragma comment(linker,\"\/subsystem:\\\"windows\\\" \/entry:\\\"mainCRTStartup\\\"\")\n\ntypedef struct _DesktopWndInfo\n{\n    int  OSVersion = 1;               \/\/ \u64cd\u4f5c\u7cfb\u7edf\u5206\u7c7b\u53f7\n    bool IsCreatedWindow = false;     \/\/ \u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u662f\u5426\u521b\u5efa\u5b8c\u6210\n    HWND WallpaperWnd = NULL;         \/\/ \u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u4e3b\u7a97\u53e3\u53e5\u67c4\n    HWND Workerw1 = NULL;             \/\/ \u7b2c\u4e00\u4e2aWorkerW\u7a97\u53e3\u53e5\u67c4\n    HWND Workerw2 = NULL;             \/\/ \u7b2c\u4e8c\u4e2aWorkerW\u7a97\u53e3\u53e5\u67c4\n    HWND ShellDefView = NULL;         \/\/ ShellDefView\u7a97\u53e3\u53e5\u67c4\n    HWND Progman = NULL;              \/\/ \u603b\u7a97\u53e3\u53e5\u67c4\n}DesktopWndInfo, * DesktopWndInfoPtr;\n\ntypedef BOOL(WINAPI* PSWITCHTOTHISWINDOW) (HWND, BOOL);\ninline BOOL CALLBACK EnumWindowsProc(HWND handle, LPARAM lparam);\nLRESULT CALLBACK __WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);\n\nint CheckOsVersion();\nDWORD mainWindowThread(void* argv);\nDWORD FindProcessIDByName(LPCWSTR processName);\nBOOL QueryEnableDwmComposition();\nBOOL PreDesktopEnvironmentInit(DesktopWndInfoPtr lpWndInfo);\nBOOL SetDynamicDesktopWindow(DesktopWndInfoPtr lpWndInfo);\n\n\nconst static wchar_t* szClass = L\"WallpaerWindowClass\";\nconst static wchar_t* szTitle = L\"WallpaerWindow\";\nconst static wchar_t* szConTitle = L\"DynamicWallpaperTool\";\n\n#define CRT_CONSOLE_TITLE L\"CASCADIA_HOSTING_WINDOW_CLASS\"\n#define OLD_CONSOLE_TITLE L\"ConsoleWindowClass\"\n\nint main(int argc, char argv[])\n{\n    DesktopWndInfo WndInfo{};\n    HWND hControlwnd = NULL;\n    SetConsoleTitleW(szConTitle);\n\n    \/\/ \u68c0\u9a8c\u7cfb\u7edf\u7248\u672c\uff0c\u7a0b\u5e8f\u4e0d\u80fd\u591f\u5728Win XP\u4ee5\u53ca\u66f4\u65e9\u7684\u7cfb\u7edf\u73af\u5883\u4e0b\u8fd0\u884c\u3002\n    WndInfo.OSVersion = CheckOsVersion();\n    if (WndInfo.OSVersion &lt;= 1)\n    {\n        printf(\"[-] This operating system is not supported.\");\n        printf(\"The program must run in a Windows 7 or higher system environment.\\n\");\n        getchar();\n        return 1;\n    }\n\n    if (WndInfo.OSVersion == 2) \/\/ Win 7 \u68c0\u67e5 DWM \u8bbe\u7f6e\n    {\n        printf(\"[*] Check if DWM is enabled.\\n\");\n        if (QueryEnableDwmComposition() == FALSE)\n        {\n            printf(\"[-] DWM was Disabled.\\n\");\n            getchar();\n            return 1;\n        }\n        else {\n            printf(\"[+] DWM is Enabled.\\n\");\n        }\n    }\n\n    \/\/ \u83b7\u53d6\u63a7\u5236\u53f0\u7a97\u53e3\u53e5\u67c4\n    do {\n        hControlwnd = FindWindowW(CRT_CONSOLE_TITLE, szConTitle);\n        if (!hControlwnd)\n            hControlwnd = FindWindowW(OLD_CONSOLE_TITLE, szConTitle);\n    } while (!hControlwnd);\n\n    \/\/ \u5c06\u7a97\u53e3\u6700\u5c0f\u5316\n    ShowWindow(hControlwnd, SW_SHOWMINIMIZED);\n\n    \/\/ \u6784\u5efa\u52a8\u6001\u58c1\u7eb8\u8fd0\u884c\u73af\u5883\uff0c\u4ee5\u53ca\u76f8\u5173\u91cf\u7684\u83b7\u53d6\n    printf(\"[*] Init Desktop Environment.\\n\");\n    if (!PreDesktopEnvironmentInit(&amp;WndInfo))\n    {\n        printf(\"[-] Init Desktop Environment failed.\\n\");\n        ShowWindow(hControlwnd, SW_SHOWNORMAL);\/\/ \u663e\u793a\u63a7\u5236\u5668\u7a97\u53e3\n        getchar();\n        return 1;\n    }\n    printf(\"[+] Init Desktop Environment Success.\\n \\n\");\n    \/\/ \u6253\u5370\u58c1\u7eb8\u7a0b\u5e8f\u4e3b\u7a97\u53e3\u7684\u53e5\u67c4\n    printf(\"[+] CefWallpeperWindow: 0x%I64X\\n\", (long long)WndInfo.WallpaperWnd);\n    if (WndInfo.WallpaperWnd == NULL)\n    {\n        ShowWindow(hControlwnd, SW_SHOWNORMAL);\n        printf(\"[-] Handle Value = (null). Restart this Program!\\n\");\n    }\n    else\n    {\n        printf(\"[*] SetDynamicDesktopWindow.\\n\");\n        if(!SetDynamicDesktopWindow(&amp;WndInfo))\n            printf(\"[-] SetDynamicDesktopWindow failed.\\n \\n\");\/\/ \u8bbe\u7f6e\u58c1\u7eb8\u7a97\u53e3\n        else\n            printf(\"[+] Program Produced!\\n \\n\");\n        ShowWindow(hControlwnd, SW_SHOWNORMAL);\/\/ \u663e\u793a\u63a7\u5236\u5668\u7a97\u53e3\n    }\n    printf(\"[*] Press any key to continue.\");\n    getchar();\n    return 0;\n}\n\nint CheckOsVersion()\n{\n    int OsVersion = -1;\n    typedef void(__stdcall* NTPROC)(DWORD*, DWORD*, DWORD*);\n    HINSTANCE hinst = GetModuleHandleA(\"ntdll.dll\");\/\/\u52a0\u8f7dDLL\n\n    NTPROC GetNtVersionNumbers = (NTPROC)\n        GetProcAddress(hinst, \"RtlGetNtVersionNumbers\");\/\/\u83b7\u53d6\u51fd\u6570\u5730\u5740\n    if (!hinst || !GetNtVersionNumbers)\n    {\n        return 0;\n    }\n\n    DWORD dwMajor, dwMinor, dwBuildNumber;\n    GetNtVersionNumbers(&amp;dwMajor, &amp;dwMinor, &amp;dwBuildNumber);\n\n    \/*\n    if (dwMajor &lt;= 6 &amp;&amp; dwMinor &lt;= 2)\n    {\n\n        if (dwMajor == 6 &amp;&amp; dwMinor &gt;= 1) return 2;\/\/ win 7, win8\n        else return 1;\/\/ win XP, vista\n    }\n    else {\n        return 3;\/\/ win8.1,10,11\n    }\n    *\/\n\n    switch (dwMajor)\n    {\n    case 6:\n        if (dwMinor == 0) \/\/ Vista\n        {\n            OsVersion = 1;\n        }\n        else if (dwMinor == 1)  \/\/ Win 7\n        {\n            OsVersion = 2;\n        }\n        else if (dwMinor == 2)  \/\/ Win 8\n        {\n            OsVersion = 3;\n        }\n        else if (dwMinor == 3)  \/\/ Win 8.1\n        {\n            OsVersion = 4;\n        }\n        break;\n    case 10:\n        OsVersion = 4; \/\/ Win 10, 11\n        break;\n    default:\n        if(dwMajor &lt;= 5)  \/\/ Win XP\n            OsVersion = 1;\n        else\n            OsVersion = 5; \/\/  Future\n        break;\n    }\n    \n    return OsVersion;\n}\n\n\/\/ TODO: \u6539\u4e3a\u4f7f\u7528 SCM \u67e5\u8be2\u670d\u52a1\u72b6\u6001\u548c\u542f\u7528\u670d\u52a1\nBOOL RunaDwmCompositionService()\n{\n    BOOL bEnabled = FALSE;\n    \n    return bEnabled;\n}\n\n\/\/0 not found ; other found; processName \"processName.exe\"\nDWORD FindProcessIDByName(LPCWSTR processName)\n{\n    DWORD processId = 0;\n    HANDLE hProcessSnap;\n    PROCESSENTRY32W pe32{};\n    pe32.dwSize = sizeof(PROCESSENTRY32W);\n    \n\n    hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);\n    if (hProcessSnap == INVALID_HANDLE_VALUE)\n    {\n        return(0);\n    }\n    \n    if (!Process32FirstW(hProcessSnap, &amp;pe32))\n    {\n        CloseHandle(hProcessSnap);\/\/ Clean the snapshot object.\n        return(0);\n    }\n    \n    do\n    {\n        if (!wcscmp(pe32.szExeFile, processName)) \/\/ \u8fdb\u7a0b\u540d\u79f0\n        {\n            processId = pe32.th32ProcessID; \/\/ \u8fdb\u7a0b ID\n            break;\n        }\n    } while (Process32NextW(hProcessSnap, &amp;pe32));\n\n    CloseHandle(hProcessSnap);\n\n    return processId;\n}\n\nBOOL QueryEnableDwmComposition()\n{\n    \/\/ \u6ce8\u610f DWM API \u5728 Vista\/Win7 \u7cfb\u7edf\u4ee5\u4e0a\u624d\u6709\n    \/\/ win8 \/ win10 \u662f\u4e0d\u9700\u8981\u5224\u65ad\u7684\u4f1a\u4e00\u76f4\u8fd4\u56de TRUE\n\n    BOOL bEnabled = FALSE;\n    typedef HRESULT(__stdcall* fnDwmIsCompositionEnabled)(BOOL* pfEnabled);\n    typedef HRESULT(__stdcall* fnDwmEnableComposition)(UINT uCompositionAction);\n\n    HMODULE hModuleDwm = LoadLibraryA(\"dwmapi.dll\");\n    if (hModuleDwm != 0)\n    {\n        auto pFuncIsEnabled =\n            (fnDwmIsCompositionEnabled)GetProcAddress(\n                hModuleDwm, \"DwmIsCompositionEnabled\");\n        auto pFuncEnableDwm =\n            (fnDwmEnableComposition)GetProcAddress(\n            hModuleDwm, \"DwmEnableComposition\");\n\n        if (pFuncIsEnabled != 0)\n        {\n            BOOL result = FALSE;\n            if (pFuncIsEnabled(&amp;result) == S_OK)\n            {\n                \/\/ \u6ca1\u6709\u542f\u52a8\u5c31\u542f\u52a8\u4e00\u4e0b\n                if(result == TRUE)\n                    bEnabled = TRUE;\n                else if (pFuncEnableDwm != 0)\n                {\n                    printf(\"[*] Attempt to start Dwm Service.\\n\");\n                    if (!FindProcessIDByName(L\"dwm.exe\"))\n                    {\n                        system(\"SC stop UxSms\");\n                        WaitForSingleObject(GetCurrentProcess(), 1500);\n                    }\n                    system(\"SC start UxSms\");\n                    WaitForSingleObject(GetCurrentProcess(), 500);\n                    \/\/ #define DWM_EC_ENABLECOMPOSITION 1\n                    if (pFuncEnableDwm(TRUE) == S_OK)\n                    {\n                        bEnabled = TRUE;\/\/ \u5224\u65ad\u542f\u52a8\u662f\u5426\u6210\u529f\n                    }\n                    else {\n                        SetLastError(ERROR_INTERNAL_ERROR);\n                    }\n                }\n            }\n        }\n        else {\n            SetLastError(ERROR_ACCESS_DENIED);\n            bEnabled = TRUE;\n        }\n\n        FreeLibrary(hModuleDwm);\n        hModuleDwm = 0;\n    }\n    return bEnabled;\n}\n\n\nBOOL PreDesktopEnvironmentInit(DesktopWndInfoPtr lpWndInfo)\n{\n    HWND hwnd = NULL;\n    HWND hWorkerW1 = NULL,\n         hWorkerW2 = NULL,\n         hDefView  = NULL;\n    LRESULT MsgRact = NULL;\n    DWORD_PTR result;\n    BOOL IsGetExitCode = FALSE;\n    clock_t start = 0, finish = 0;\n    double  duration = 0;\n    const double eps = 0x2D;\/\/ 45\u79d2\n    int CountCircle = 0;\n    bool CreateFlag = false;\n    \n    if (lpWndInfo == NULL)\n        return FALSE;\n\n    SetLastError(0);\n    hwnd = FindWindowW(L\"Progman\", L\"Program Manager\");  \/\/ \u6839\u636e https:\/\/github.com\/valinet\/ExplorerPatcher\/issues\/525\uff0c\u53ef\u80fd\u4f7f\u7528 HWND progman = GetShellWindow(); \u66f4\u52a0\u59a5\u5f53\n\n    if (hwnd == NULL\n        || GetLastError() == ERROR_INVALID_WINDOW_HANDLE)\n    {\n        printf(\"[-] Fatal Error: No found Desktop Manager Window.\\n\");\n        return FALSE;\n    }\n\n    printf(\"[*] SendMessage To Program Manager, message: [0x052C], Timeout: [0x03E8]\\n\");\n    \/\/ \u5411Program Manager\u7a97\u53e3\u53d1\u9001\u6d88\u606f\n    SetLastError(0);\n    MsgRact = SendMessageTimeoutW(hwnd, 0x052C, 0, 0, SMTO_NORMAL, 0x03E8, &amp;result);\n\n    \/\/ \u53ef\u80fd\u5b58\u5728\u7535\u8111\u6027\u80fd\u95ee\u9898\n    while(0 == MsgRact &amp;&amp; CountCircle &lt;= 5)\n    {\n        CountCircle++;\n        printf(\"[-] Error SendMessageTimeout, err_code: [%d].\\n\", \n            GetLastError());\n        \/\/ \u91cd\u65b0\u5c1d\u8bd5\n        WaitForSingleObject(GetCurrentProcess(), 300);\n        if (ERROR_TIMEOUT == GetLastError())\n            MsgRact =\n            SendMessageTimeoutW(hwnd, 0x052C, 0, 0, SMTO_NORMAL, 0x03E8, &amp;result);\n        else\n            return FALSE;\n        SetLastError(0);\n    }\n\n    printf(\"[+] Result[0]: %I64d. Progman Handle: [ 0x%I64X ]\\n\",\n        result, (long long)hwnd);\n\n    if (hwnd == NULL || result != 0u)\n    {\n        printf(\"[-] Handle Value = (null). SendMessage failed! err_code: [ %d ]\\n\",\n            GetLastError());\n        return FALSE;\n    }\n    printf(\"[+] SendMessage successfully.\\n \\n\");\n\n    (*lpWndInfo).Progman = hwnd;\n    printf(\"[*] EnumDesktopWorkerWindows...\\n\");\n    \/\/\u679a\u4e3e\u7a97\u53e3\n    SetLastError(0);\n    EnumWindows(EnumWindowsProc, (LPARAM)lpWndInfo);\n    \/\/ TODO: \u8fd9\u91cc\u4fee\u6539\u4e0d\u5bf9 EnumWindows \u8fd4\u56de\u503c\u76f4\u63a5\u8fdb\u884c\u5224\u65ad\n    if ((*lpWndInfo).Workerw1 == nullptr || GetLastError() &gt; 0)\n    {\n        printf(\"[-] EnumWindows failed.\\n\");\n        return FALSE;\n    }\n    printf(\"[+] EnumWindows Finished.\\n\");\n    \/\/ \u6821\u9a8c WorkerW1 \u662f\u5426\u662f\u7a97\u53e3\u662f\u684c\u9762\u3002\n    hWorkerW1 = (*lpWndInfo).Workerw1;\n    hWorkerW2 = (*lpWndInfo).Workerw2;\n    hDefView = (*lpWndInfo).ShellDefView;\n    HWND hParent = GetParent(hDefView);\n\n    if (hWorkerW1 != NULL &amp;&amp; hWorkerW1 != hwnd\n        &amp;&amp; hParent == hWorkerW1) \/\/ DWM \u6b63\u5e38\u65f6\uff0c\u7a97\u53e3\u4e0d\u5e94\u8be5\u662f Progman \u5e94\u8be5\u662f WorkerW\n    {\n        printf(\"[+] EnumWindows successfully.\\n \\n\");\n        printf(\"[+] WorkerW 1: [ 0x%I64X ] | WorkerW 2: [ 0x%I64X ]\\n\", \n            (long long)hWorkerW1,\n            (long long)hWorkerW2);\n    }\n    else {\n        printf(\"[-] EnumWindows failed.\\n \\n\");\n        return FALSE;\n    }\n        \n\n    printf(\"[*] CreateThread To Handle MainWindowProc.\\n\");\n    \/\/ \u5728\u7ebf\u7a0b\u4e2d\u521b\u5efa\u7a97\u53e3\n    \n    start = clock();\/\/ \u5f00\u59cb\u8ba1\u65f6\n    HANDLE hThread = CreateThread(NULL, 0, mainWindowThread, lpWndInfo, 0, NULL);\n    if (hThread == NULL)\n    {\n        printf(\"[*] CreateThread failed.err_code[ %d ]\\n\", GetLastError());\n        return FALSE;\n    }\n    DWORD dwExitCode = 0;\n    \/\/ \u7b49\u5f85\u7a97\u53e3\u52a0\u8f7d\u5b8c\u6210\n    do {\n        IsGetExitCode = GetExitCodeThread(hThread, &amp;dwExitCode);\n        WaitForSingleObject(hThread, 0);\/\/ WAIT_TIMEOUT\n        CreateFlag = (*lpWndInfo).IsCreatedWindow;\n        finish = clock();\n        duration = (double)(finish - start) \/ CLOCKS_PER_SEC;\n    } while (!CreateFlag &amp;&amp; \n        dwExitCode == STILL_ACTIVE \n        &amp;&amp; IsGetExitCode != FALSE \n        &amp;&amp; fabs(duration) &lt;= eps);\n    if (!CreateFlag)\n    {\n        printf(\"[*] CreateThread failed. ERROR_TIMEOUT\\n \\n\");\n        return FALSE;\n    }\n    else {\n        printf(\"[+] Thread Handle: [ 0x%I64X ]\\n \\n\", (long long)hThread);\n        return TRUE;\n    }\n}\n\ninline BOOL CALLBACK EnumWindowsProc(HWND handle, LPARAM lparam)\n{\n    if ((void*)lparam == nullptr)\n        return FALSE;\n    auto WndInfo = (DesktopWndInfoPtr)lparam;\n    DWORD_PTR result = 0;\n    \/\/ \u83b7\u53d6\u7b2c\u4e00\u4e2aWorkerW\u7a97\u53e3\n    HWND DefView = FindWindowExW(handle, 0, L\"SHELLDLL_DefView\", NULL);\n\n    if (DefView != NULL)\/\/ \u627e\u5230\u7b2c\u4e00\u4e2aWorkerW\u7a97\u53e3\n    {\n        (*WndInfo).Workerw1 = handle;\n        (*WndInfo).ShellDefView = DefView;\n        \/\/ \u83b7\u53d6\u7b2c\u4e8c\u4e2aWorkerW\u7a97\u53e3\u7684\u7a97\u53e3\u53e5\u67c4\n        (*WndInfo).Workerw2 = FindWindowExW(0, handle, L\"WorkerW\", 0);\n        return FALSE;\n    }   \/\/ Patch\uff1a\u53ef\u80fd\u964d\u4f4e\u6027\u80fd\u6216\u5bfc\u81f4\u4e25\u91cd\u8d85\u65f6\n\/\/    else {\/\/ \u5982\u679c\u4e0d\u80fd\u627e\u5230\u7b2c\u4e00\u4e2aWorkerW, \u5219\u91cd\u65b0\u53d1\u9001\u6d88\u606f\n\/\/        HWND hProgman = (*WndInfo).Progman;\n\/\/        SendMessageTimeoutW(hProgman, 0x052C, 0, 0, SMTO_NORMAL, 0x03E8, &amp;result);\n\/\/    }\n    return TRUE;\n}\n\n\/\/ \u53c2\u6570hWallpaperwnd\u4e3a\u4f60\u5f00\u53d1\u7684\u7a97\u53e3\u7a0b\u5e8f\u7684\u7a97\u53e3\u53e5\u67c4\n\/\/ DesktopWndInfoPtr\u4f20\u5165\u7ed3\u6784\u4f53\u6307\u9488\nBOOL SetDynamicDesktopWindow(DesktopWndInfoPtr lpWndInfo)\n{\n    if (lpWndInfo == NULL)\n        return FALSE;\n\n    RECT rc = { 0,0,0,0 };\n    LONG style = 0,\n         SWLRetn = 0;\n    HWND\n         hClientWnd = (*lpWndInfo).WallpaperWnd,\n         hWorkerW = (*lpWndInfo).Workerw2,\n         hProgman = (*lpWndInfo).Progman;\n    HWND LastParent = NULL;\n    DWORD nSPerror = 0;\n    int Version = (*lpWndInfo).OSVersion;\n    int scWidth, scHeight, perx, pery;\n    int ctWidth, ctHeight;\n\n    if (hClientWnd == NULL)\n    {\n        SetLastError(ERROR_INVALID_WINDOW_HANDLE);\n        printf(\"[-] Fatal error: NoFoundWindow.\\n\");\n        return FALSE;\n    }\n\n    \/\/\u83b7\u53d6\u5c4f\u5e55\u5bbd\u9ad8\n    scWidth = GetSystemMetrics(SM_CXSCREEN);\n    scHeight = GetSystemMetrics(SM_CYSCREEN);\n    printf(\"[+] ScreenRectInformation: [ %d x %d ]\\n\", scWidth, scHeight);\n\n    \/\/ \u540c\u6b65\u7a97\u53e3\u7684\u98ce\u683c\uff0c\u5426\u5219SetParent()\u5c06\u51fa\u73b0\u610f\u6599\u4e4b\u5916\u7684\u7ed3\u679c\u3002\n    style = GetWindowLongW(hClientWnd, GWL_STYLE);\n    style &amp;= ~WS_POPUP &amp; ~WS_CAPTION &amp; ~WS_SIZEBOX;\n    style |= WS_CHILD;\n    SWLRetn = \n        SetWindowLongW(hClientWnd, GWL_STYLE, style);\n\n    if (SWLRetn == 0)\n    {\n        printf(\"[-] FatalError: SetWindowLong Error!err_code[ %d ]\\n\", \n            GetLastError());\n        return FALSE;\n    }\n\n\n    \/\/ \u8bbe\u7f6e\u7236\u7a97\u53e3\n    printf(\"[*] SetParent: SetWallpaperWindow.\\n\");\n    \n    if (Version == 2 || Version == 3) \/\/  Win 7, Win 8\n    {\n        if (hProgman == NULL)\/\/ TODO\n        {\n            PostMessageW(hClientWnd, SC_CLOSE, 0,0);\n            SetLastError(ERROR_INVALID_WINDOW_HANDLE);\n            printf(\"[-] SetParent Fatal error: hParent must not be NULL.\\n\");\n            return FALSE;\n        }\n        ShowWindow(hWorkerW, SW_HIDE);\n        SetLastError(0);\n        LastParent = SetParent(hClientWnd, hProgman);\n    }\n    else {\n        if (hWorkerW == NULL)\n        {\n            PostMessageW(hClientWnd, SC_CLOSE, 0, 0);\n            SetLastError(ERROR_INVALID_WINDOW_HANDLE);\n            printf(\"[-] SetParent Fatal error: hParent must not be NULL.\\n\");\n            return FALSE;\n        }\n        SetLastError(0);\n        LastParent = SetParent(hClientWnd, hWorkerW);\n    }\n\n    nSPerror = GetLastError();\n    if (nSPerror &gt; 0 || LastParent == NULL)\n    {\n        printf(\"[-] FatalError: SetParent Error!err_code[ %d ]\\n \\n\", nSPerror);\n        return FALSE;\n    }\n    printf(\"[+] SetParent Success, hChild[ 0x%I64X ] | hParent[ 0x%I64X ].\\n \\n\",\n        (long long)hClientWnd, \n        Version == 2 ? (long long)hProgman : (long long)hWorkerW);\n\n    printf(\"[*] DisplayWindowsAnimation using SetWindowPos.\\n\");\n    \/\/ \u52a8\u753b\uff1a\u6cbf\u5bf9\u89d2\u7ebf\u62c9\u4f38\u6548\u679c\n    perx = scWidth \/ 10;\n    pery = scHeight \/ 10;\n    for (int i = 0; i &lt;= 10; i++)\n    {\n        \/\/SetWindowPos(hClientWnd,\n        \/\/    NULL, 0, 0, perx, pery, SWP_FRAMECHANGED);\n        \/\/ \u8865\u4e01\uff1a2024.06.16\n        SetWindowPos(hClientWnd,\n            NULL, 0, 0, perx, pery, SWP_NOZORDER | SWP_FRAMECHANGED);\n        perx += perx;\n        pery += pery;\n        Sleep(35);\n    }\n    \/\/ \u786e\u4fdd\u52a8\u6001\u58c1\u7eb8\u4e3b\u7a97\u53e3\u662f\u5168\u5c4f\u7684\n    ShowWindow(hClientWnd, SW_SHOWMAXIMIZED);\n    SetWindowPos(hClientWnd,\n        NULL, 0, 0, scWidth, scHeight, SWP_NOZORDER | SWP_FRAMECHANGED);\n    \n    GetWindowRect(hClientWnd, &amp;rc);\n    ctWidth = rc.right - rc.left;\n    ctHeight = rc.bottom - rc.top;\n\n    if (ctWidth != scWidth || ctHeight != scHeight)\n    {\n        printf(\"[-] SetWindowPos failed.\\n \\n\");\n        return FALSE;\n    }\n    printf(\"[+] SetWindowPos Success.\\n \\n\");\n    printf(\"[+] SetWallpeperWindow Successfully!\\n\");\n    return TRUE;\n}\n\n\nDWORD mainWindowThread(void* argv)\n{\n    if (argv == nullptr)\n        return 1;\n\n    auto WndInfo = (DesktopWndInfoPtr)argv;\n    HINSTANCE hIns = GetModuleHandle(0);\n    WNDCLASSEXW wc{};\n    wc.cbSize = sizeof(wc);\n    wc.style = CS_HREDRAW | CS_VREDRAW;\n    wc.cbClsExtra = 0;\n    wc.cbWndExtra = 0;\n    wc.hInstance = hIns;\n    wc.hIcon = LoadIcon(0, IDI_APPLICATION);\n    wc.hIconSm = 0;\n    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);\n    wc.hCursor = LoadCursor(0, IDC_ARROW);\n    wc.lpfnWndProc = __WndProc;\n    wc.lpszMenuName = NULL;\n    wc.lpszClassName = szClass;\n\n    if (!RegisterClassExW(&amp;wc))\n    {\n        printf(\"[-] FatalError: RegisterClassEx failed! err_code[ %d ]\\n\", \n            GetLastError());\n        return 1;\n    }\n\n    DWORD style = WS_OVERLAPPEDWINDOW;\n    DWORD styleEx = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;\n\n    \/\/\u8ba1\u7b97\u5ba2\u6237\u533a\u57df\u4e3a\u5bbd800,\u9ad8600\u7684\u7a97\u53e3\u5c3a\u5bf8\n    RECT rect = { 0, 0, 800, 600 };\n    AdjustWindowRectEx(&amp;rect, style, false, styleEx);\n\n    HWND hwnd = CreateWindowExW(styleEx, szClass, szTitle, style, 0, 0,\n        rect.right - rect.left, rect.bottom - rect.top, 0, 0, hIns, 0);\n    \/\/ \u68c0\u67e5\u7a97\u53e3\u521b\u5efa\u662f\u5426\u6210\u529f\n    if (hwnd == 0)\n    {\n        printf(\"[-] FatalError: CreateWindowEx failed! err_code[ %d ]\\n\",\n            GetLastError());\n        return 1;\n    }\n\n    UpdateWindow(hwnd);\n    ShowWindow(hwnd, SW_SHOW);\n    \/\/ \u8bb0\u5f55\u7a97\u53e3\u53e5\u67c4\u4fe1\u606f\uff0c\u6807\u8bb0\u7a97\u53e3\u5df2\u7ecf\u521b\u5efa\n    (*WndInfo).WallpaperWnd = hwnd;\n    (*WndInfo).IsCreatedWindow = true;\n    \/\/TODO, init this\n\n    MSG msg = { 0 };\n    while (msg.message != WM_QUIT) {\n        if (PeekMessageW(&amp;msg, 0, 0, 0, PM_REMOVE)) {\n            \/\/printf(\"hwnd: [ 0x%I64X ] | Message: [ %X ] | wParam: [ 0x%I64X] | lParam: [0x%I64X]\\n\", \n                \/\/(long long)msg.hwnd, msg.message, msg.wParam, msg.lParam);\n            TranslateMessage(&amp;msg);\n            DispatchMessageW(&amp;msg);\n        }\n    }\n    \/\/ \u7a97\u53e3\u7ebf\u7a0b\u7ed3\u675f\uff0c\u6807\u8bb0\u7a97\u53e3\u88ab\u5173\u95ed\n    (*WndInfo).IsCreatedWindow = false;\n    return 0;\n}\n\nLRESULT CALLBACK __WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)\n{\n    PAINTSTRUCT ps;\n    HDC hdc;\n    switch (uMsg) {\n    case WM_CLOSE:\n        DestroyWindow(hWnd);\n        break;\n    case WM_DESTROY:\n        PostQuitMessage(0);\n        break;\n    case WM_PAINT:\n        hdc = BeginPaint(hWnd, &amp;ps);\n        EndPaint(hWnd, &amp;ps);\n        break;\n    default:\n        return DefWindowProc(hWnd, uMsg, wParam, lParam);\n    }\n    return 0;\n}<\/code><\/pre>\n<h4 id=\"3.2%20%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E5%B1%95%E7%A4%BA\">\n   <span style=\"color:#0d0016\"><br \/>\n    4.2 \u8fd0\u884c\u7ed3\u679c\u5c55\u793a<br \/>\n   <\/span><br \/>\n  <\/h4>\n<p>\n   <strong><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u6ce8\u610f\uff1a\u4ee3\u7801\u5fc5\u987b\u8bbe\u7f6e DPI \u611f\u77e5\u6e05\u5355\uff0c\u4ee5\u4fbf\u4e8e\u540c\u6b65\u684c\u9762\u7a97\u53e3\u7684\u7f29\u653e\u663e\u793a\uff0c\u907f\u514d\u663e\u793a\u7684\u5143\u7d20\u51fa\u73b0\u9519\u4f4d\u7b49\u6df7\u4e71\u73b0\u8c61\u3002<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5d4c\u5165\u76ee\u6807\u7a97\u53e3\u5230\u684c\u9762\u7ba1\u7406\u5c42<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6253\u5f00\u201c\u4efb\u52a1\u89c6\u56fe\u201d<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win7 \u8fd0\u884c\u7ed3\u679c<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<h3 id=\"5.%20%E5%85%B3%E4%BA%8E%E5%90%8E%E7%BB%AD%E5%B7%A5%E4%BD%9C\">\n   5. \u5173\u4e8e\u540e\u7eed\u5de5\u4f5c<br \/>\n  <\/h3>\n<p>\n   \u5f53\u5b8c\u6210\u4e86\u5d4c\u5165\u7a97\u53e3\u90e8\u5206\u7684\u5b9e\u73b0\u540e\uff0c\u540e\u7eed\u9700\u8981\u6211\u4eec\u638c\u63e1\u7a97\u53e3\u7a7f\u900f\u4ea4\u4e92\u7684\u5b9e\u73b0\u548c\u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u7684\u5b9e\u73b0\u3002\n  <\/p>\n<p>\n   \u7531\u4e8e\u6211\u4eec\u7684\u7a97\u53e3\u65e0\u6cd5\u83b7\u5f97\u7126\u70b9\uff08\u7a97\u53e3\u7684 Z \u5e8f\u4f4e\u4e8e SHELL_DefView\uff09\uff0c\u6240\u4ee5\u6d88\u606f\u662f\u65e0\u6cd5\u76f4\u63a5\u901a\u8fc7\u4eba\u4f53\u5b66\u8bbe\u5907\u548c\u7cfb\u7edf\u4f20\u9012\u7ed9\u7a97\u53e3\u7684\u3002\u8981\u60f3\u7528\u6237\u80fd\u591f\u901a\u8fc7\u9f20\u6807\u548c\u8be5\u7a97\u53e3\u4e0a\u9762\u7684\u5143\u7d20\u8fdb\u884c\u4ea4\u4e92\uff0c\u5c31\u5fc5\u987b\u80fd\u591f\u5c06\u6d88\u606f\u4f20\u9012\u7ed9\u8fd9\u4e2a\u7a97\u53e3\u3002\u76ee\u524d\u4e3b\u8981\u6709\u4e24\u79cd\u4e3b\u6d41\u7684\u5b9e\u73b0\u65b9\u6cd5\uff1a\uff081\uff09\u5f53\u5b8c\u5168\u5728\u684c\u9762\u64cd\u4f5c\u65f6\uff0c\u5c06\u524d\u53f0\u7a97\u53e3\uff08ShellDefView\uff09\u7684\u7a97\u53e3\u6d88\u606f\u622a\u83b7\u5e76\u8f6c\u53d1\u5230\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\uff0c\u8fd9\u9700\u8981\u8bbe\u7f6e\u6d88\u606f\u8fc7\u6ee4\u5668\u5e76\u89e3\u51b3\u6d88\u606f\u963b\u585e\u95ee\u9898\uff1b\uff082\uff09<br \/>\n   <strong><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     [\u53ef\u884c\u6027\u66f4\u9ad8]<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u5f53\u5b8c\u5168\u5728\u684c\u9762\u64cd\u4f5c\u5e76\u4e14\u8bbe\u7f6e\u5141\u8bb8\u65f6\uff0c\u901a\u8fc7\u4f4e\u7ea7\u9f20\u6807\u94a9\u5b50\u6355\u83b7\u9f20\u6807\u4fe1\u606f\uff0c\u5e76\u5c06\u6a21\u62df\u6d88\u606f\u53d1\u9001\u5230\u6307\u5b9a\u7684\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\uff0c\u4e5f\u9700\u8981\u9002\u5f53\u5904\u7406\u6d88\u606f\u95ee\u9898\u3002\n  <\/p>\n<p>\n   \u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u4e3b\u8981\u4e3a\u4e09\u79cd\u7c7b\u578b\uff1a\u5185\u7f6e\u89c6\u9891\u64ad\u653e\u5668\u5f0f\u52a8\u6001\u58c1\u7eb8\u3001\u5185\u7f6e Web \u6d4f\u89c8\u5668\u5f0f\u52a8\u6001\u58c1\u7eb8\u4ee5\u53ca\u56fe\u7247\u5207\u6362\u5f0f\u52a8\u6001\u58c1\u7eb8\u3002\u7b2c\u4e00\u79cd\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\uff0c\u5f80\u5f80\u4f7f\u7528 ffmpeg \u6216 mpv \u7b49\u89c6\u9891\u89e3\u7801\u548c\u64ad\u653e\u5668\uff1b\u4e2d\u95f4\u8fd9\u79cd\u5b9e\u73b0\u76f8\u5bf9\u590d\u6742\uff0c\u4f46\u5177\u6709\u5f88\u5f3a\u7684\u6269\u5c55\u6027\u80fd\uff0cSteam \u7684 WallpaperEngine \u5c31\u662f\u5178\u578b\u7684 Web \u6d4f\u89c8\u5668\u5f0f\u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u3002\u6709\u4e9b\u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u96c6\u6210\u5f00\u53d1\u73af\u5883 (IDE) \u6216\u8005\u547d\u4ee4\u89e3\u91ca\u5668\u7ec8\u7aef (Terminal)\uff0c\u4ee5\u4fbf\u4e8e\u58c1\u7eb8\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u8f7b\u677e\u6269\u5c55\u4ed6\u4eec\u7684\u52a8\u6001\u58c1\u7eb8\uff0c\u4f8b\u5982 WallpaperEngine (\u5546\u4e1a\u6027) \u548c Live Wallpaper (\u5f00\u6e90\u514d\u8d39) \u5c31\u5206\u522b\u63d0\u4f9b\u4e86\u7f16\u8f91\u5668 (WallpaperEngine) \u548c Python \u547d\u4ee4\u89e3\u91ca\u5668 (Live Wallpaper)\u3002\u6b64\u5916\uff0cLive Wallpaper \u8fd8\u62d3\u5c55\u4e86\u5e7b\u706f\u7247\u64ad\u653e\u58c1\u7eb8\u548c GIF \u52a8\u56fe\u58c1\u7eb8\u7684\u652f\u6301\u3002\u56fe\u7247\u5207\u6362\u5f0f\u52a8\u6001\u58c1\u7eb8\u4e5f\u6709\u5e94\u7528\u7684\u573a\u666f\uff0c\u5982 DynamicDesktop \u5f00\u6e90\u52a8\u6001\u58c1\u7eb8\u8f6f\u4ef6\u6a21\u4eff Mac \u7cfb\u7edf\u7684\u52a8\u6001\u58c1\u7eb8\uff0c\u5728\u7279\u5b9a\u6c14\u5019\u6216\u8005\u65f6\u95f4\u8282\u70b9\u901a\u8fc7\u7cfb\u7edf\u652f\u6301\u7684 API \u8bbe\u7f6e\u6807\u51c6\u7684\u7cfb\u7edf\u58c1\u7eb8\u548c\u5207\u6362\u58c1\u7eb8\uff08\u6ca1\u6709\u91c7\u7528 0x052C \u6d88\u606f\u7b49\u590d\u6742\u673a\u5236\uff09\uff0c\u8fd9\u4e00\u70b9\u770b\u4e0a\u53bb\u8fd8\u662f\u633a\u6709\u521b\u610f\u7684\u3002\n  <\/p>\n<p>\n   \u540e\u7eed\u7684\u5de5\u4f5c\u5c06\u5728\u65b0\u7684\u6587\u7ae0\u4e2d\u5f00\u5c55 \u2014\u2014 \u81ea\u8ba4\u4e3a\u8fd9\u4e00\u7bc7\u6587\u7ae0\u5df2\u7ecf\u5341\u5206\u51cc\u4e71\u4e0d\u582a\u4e86\uff08\u6df7\u5408\u4e86\u592a\u591a\u5185\u5bb9\u548c\u7ec6\u8282\uff09\uff0c\u5bfc\u81f4\u53ef\u80fd\u5e76\u4e0d\u9002\u7528\u4e8e\u521d\u5b66\u8005\u548c\u4e2a\u4eba\u9605\u8bfb\u4f7f\u7528\u3002\n  <\/p>\n<h2 id=\"4.%20%E5%90%91%E5%90%8E%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%EF%BC%883%E6%9C%8817%E6%97%A5%E6%9B%B4%E6%96%B0%EF%BC%89\" style=\"background-color:transparent\">\n   <span style=\"color:#0d0016\"><br \/>\n    \u56db\u3001\u5904\u7406\u5411\u540e\u517c\u5bb9\u6027\u95ee\u9898\uff086 \u6708 25 \u65e5\u66f4\u65b0\uff09<br \/>\n   <\/span><br \/>\n  <\/h2>\n<h3 id=\"4.1%20%E9%97%AE%E9%A2%98%E6%8F%90%E5%87%BA\">\n   <span style=\"color:#0d0016\"><br \/>\n    4.1 \u95ee\u9898\u63d0\u51fa<br \/>\n   <\/span><br \/>\n  <\/h3>\n<p>\n   \u5fae\u8f6f\u4e8e 2024 \u5e74 3 \u6708 13 \u65e5\u5411\u00a0Canary \u548c Dev \u9891\u9053\u53d1\u5e03\u4e86<br \/>\n   <strong><br \/>\n    Windows 11 Insider Preview Build 26080<br \/>\n   <\/strong><br \/>\n   \u300226080 \u66f4\u65b0\u5305\u4e3a 24H2 \u7684 Preview \u7248\u672c\u3002<br \/>\n   <s><br \/>\n    \u5fae\u8f6f\u8ba1\u5212\u5c06\u5728 2024 \u5e74 9 \u6708\u5728\u6b63\u5f0f\u53d1\u5e03\u6e20\u9053\u5168\u9762\u63a8\u51fa 24H2 \u7248\u672c\u66f4\u65b0\u3002<br \/>\n   <\/s><br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    Windows 11 24H2 \u5c06\u4ece 9 \u6708 24 \u65e5\u5f00\u59cb\u9010\u6b65\u4ee5\u53ef\u9009\u975e\u9884\u89c8\u7248\u5f62\u5f0f\u5411 PC \u63a8\u9001\uff0c\u5e76\u5c06\u4e8e 2024 \u5e74 10 \u6708 8 \u65e5\u901a\u8fc7\u6bcf\u6708\u7684&#8221;\u661f\u671f\u4e8c\u8865\u4e01&#8221;\u6b63\u5f0f\u5411\u6240\u6709\u517c\u5bb9\u7cfb\u7edf\u5168\u9762\u63d0\u4f9b<br \/>\n   <\/span><br \/>\n   \u3002\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     [\u63d0\u793a] WallpaperEngine \u7684\u5f00\u53d1\u8005\u5df2\u7ecf\u8ddf Microsoft \u56e2\u961f\u5408\u4f5c\u53d1\u5e03\u4e86\u9488\u5bf9 24H2 \u7684\u91cd\u5927\u4fee\u590d\uff08 Wallpaper Engine 2.5 \u6216\u66f4\u9ad8\u7248\u672c\uff09\u3002<br \/>\n    <\/span>\n   <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n      Wallpaper Engine \u95ee\u9898\u53cd\u9988\u4ea4\u6d41\u9875<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n    \u6839\u636e\u76ee\u524d\u7684\u5fae\u8f6f\u901a\u77e5\uff0c\u5df2\u7ecf\u8bc1\u5b9e\u4e86 24H2 \u4e0e\u5176\u4ed6\u9002\u7528\u4e8e\u65e7\u7248\u672c\u7cfb\u7edf\u7684\u52a8\u6001\u58c1\u7eb8\u8f6f\u4ef6\u4ea7\u751f\u4e0d\u517c\u5bb9\uff1a\n   <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n      \u5fae\u8f6f\u5b98\u65b9\u7684\u901a\u77e5<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<\/blockquote>\n<p>\n   15 \u53f7\u4e0a\u5348\uff082 \u5929\u540e\uff09\uff0c\u5fae\u8f6f\u5f00\u59cb\u5411<br \/>\n   <strong><br \/>\n    \u5f00\u53d1\u4eba\u5458\u9891\u9053<br \/>\n   <\/strong><br \/>\n   \u4e2d\u7684 Windows \u9884\u89c8\u4f53\u9a8c\u6210\u5458\u63a8\u51fa\u7d2f\u79ef\u66f4\u65b0\u5185\u90e8\u7248\u672c 26080.1201\uff08KB5037135\uff09\u3002\u5fae\u8f6f\u58f0\u79f0 KB5037135 \u66f4\u65b0\u4e0d\u5305\u542b\u4efb\u4f55\u65b0\u5185\u5bb9\uff0c\u65e8\u5728\u6d4b\u8bd5\u670d\u52a1\u7ba1\u9053\u3002\n  <\/p>\n<p>\n   \u636e<br \/>\n   <span style=\"color:#4da8ee\"><br \/>\n    @\u5c0f\u5f6c\u5148\u751f<br \/>\n   <\/span><br \/>\n   \u7684\u53cd\u6620\uff0c\u5fae\u8f6f\u4f3c\u4e4e\u5bf9\u8d44\u6e90\u7ba1\u7406\u5668\u7684\u4e00\u4e9b\u7ec6\u8282\u8fdb\u884c\u4e86\u6539\u52a8\uff0c\u73b0\u5728\u6211\u4eec\u53ea\u80fd\u5f62\u6210\u4e00\u4e2a WorkerW \u7a97\u53e3\u3002\u76ee\u524d\u6ca1\u6709\u4efb\u4f55\u6587\u732e\u4ecb\u7ecd\u89e3\u91ca\u4e86\u8fd9\u79cd\u60c5\u51b5\uff0c\u7c7b\u4f3c\u7684\u60c5\u51b5\u53ef\u80fd\u66fe\u7ecf\u53d1\u751f\u8fc7\uff0c\u6709\u4e9b\u4eba\u4e5f\u8bb8\u6ce8\u610f\u5230\uff0c\u4f46\u5927\u591a\u6570\u4eba\u5e76\u672a\u610f\u8bc6\u5230\u8fd9\u4e9b\u53d8\u5316\u53ef\u80fd\u5e26\u6765\u7684\u4e25\u91cd\u540e\u679c\u3002\u4f7f\u7528\u4e86\u7c7b\u4f3c\u672c\u6587\u7684\u5b9e\u73b0\u903b\u8f91\uff08\u603b\u7ed3\u81ea\u76ee\u524d\u5927\u591a\u6570\u6210\u529f\u7684\u6848\u4f8b\uff09\u7684\u52a8\u6001\u58c1\u7eb8\u8f6f\u4ef6\u53ef\u80fd\u56e0\u4e3a\u641c\u7d22\u7a97\u53e3\u9519\u8bef\u800c\u5bfc\u81f4\u52a8\u6001\u58c1\u7eb8\u65e0\u6cd5\u663e\u793a\u7684\u95ee\u9898\u3002\u4e0b\u9762\u6211\u5c06\u5728\u76ee\u524d\u914d\u7f6e\u7684\u865a\u62df\u73af\u5883\u4e0b\uff0c\u5bf9\u8be5\u95ee\u9898\u8fdb\u884c\u590d\u73b0\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5f02\u5e38\uff1a\u641c\u7d22\u7a97\u53e3\u5931\u8d25<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5728\u63a5\u6536\u5230\u76f8\u5e94\u7684\u53cd\u9988\u540e\uff0c\u6211\u6839\u636e\u5916\u90e8\u6d4b\u8bd5\u4e2d\u5fc3\u7684 ISO \u6587\u4ef6\u5728\u865a\u62df\u673a\u90e8\u7f72\u4e86 24H2 \u7684 Dev \u6e20\u9053\u7248\u672c\u3002\n  <\/p>\n<p>\n   <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows-insider\/flight-hub\/\" rel=\"nofollow\" title=\"\u5916\u90e8\u6d4b\u8bd5\u7248\u4e2d\u5fc3 - Windows Insider Program | Microsoft Learn\"><br \/>\n    \u5916\u90e8\u6d4b\u8bd5\u7248\u4e2d\u5fc3 &#8211; Windows Insider Program | Microsoft Learn<br \/>\n   <\/a>\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5916\u90e8\u6d4b\u8bd5\u4e2d\u5fc3\u66f4\u65b0\u65e5\u5fd7<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u6d4b\u8bd5\u7248\u672c\u53f7\u5982\u4e0b\u56fe\u6240\u793a\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6d4b\u8bd5\u7248\u672c\u6807\u7b7e<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u73b0\u5728\uff0c\u5728\u53d1\u9001 0x052C \u6d88\u606f\u540e\uff0c\u684c\u9762\u56fe\u6807\u7a97\u53e3\u7684\u5c42\u6b21\u7ed3\u6784\u7c7b\u4f3c\u4e8e XP \u7cfb\u7edf\uff0c\u8fd9\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u53d8\u5316\uff0c\u4f3c\u4e4e\u6709\u70b9\u201c\u8fd4\u7956\u201d\u73b0\u8c61\u3002\u6211\u4eec\u73b0\u5728\u53ea\u6709\u4e00\u4e2a WorkerW \u7a97\u53e3\uff0c\u800c\u4e0d\u662f\u4ea7\u751f\u4e24\u4e2a\u4e0d\u540c\u7684 WorkerW \u7a97\u53e3\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     Win11 24H2 \u53d1\u9001\u6d88\u606f\u540e\u7684\u7a97\u53e3\u5c42\u6b21<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u7531\u6b64\u53ef\u89c1\uff0c\u7a97\u53e3\u7ed3\u6784\u7684\u5de8\u5927\u53d8\u5316\u662f\u5bfc\u81f4\u52a8\u6001\u58c1\u7eb8\u7a0b\u5e8f\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u7684\u539f\u56e0\u3002\n  <\/p>\n<p>\n   \u6211\u4eec\u73b0\u5728\u9700\u8981\u4e00\u4e2a\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u5728\u552f\u4e00\u7684\u00a0WorkerW \u4e0b\u5d4c\u5165\u6211\u4eec\u7684\u7a97\u53e3\u3002<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4fee\u6539\u67e5\u627e\u7a97\u53e3\u7684\u903b\u8f91\uff0c\u4fee\u6539\u00a0EnumWindowsProc \u51fd\u6570\uff0c\u6dfb\u52a0\u5bf9\u8fd9\u79cd\u7a97\u53e3\u5c42\u6b21\u7684\u652f\u6301\u3002<br \/>\n   <\/span>\n  <\/p>\n<p>\n   \u5176\u6b21\uff0cSHELL_DefView \u7a97\u53e3\u5177\u6709\u65b0\u589e\u7684 WS_EX_LAYERED \u5206\u5c42\u7a97\u53e3\u6837\u5f0f\uff0c\u8fd9\u8bf4\u660e\u5fae\u8f6f\u5f88\u6709\u53ef\u80fd\u628a\u7b2c\u4e00\u4e2a WorkerW \u7684\u529f\u80fd\u8f6c\u79fb\u5230\u00a0SHELL_DefView \u4e0a\u4e86\u3002\n  <\/p>\n<p>\n   \u89e3\u51b3\u56e0\u66f4\u65b0\u800c\u5bfc\u81f4\u7684\u95ee\u9898\u9700\u8981\u989d\u5916\u7684\u64cd\u4f5c\uff0c\u4e0b\u9762\u5217\u4e3e\u51e0\u79cd<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     \u53ef\u80fd<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u7684\u65b9\u6848\uff08\u5b9e\u9a8c\u4e2d\uff09\uff1a\n  <\/p>\n<ol>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      DWM \u7f29\u7565\u56fe\u6280\u672f<br \/>\n     <\/strong><br \/>\n     \uff1a\u5c1d\u8bd5\u5229\u7528 DWM \u7f29\u7565\u56fe\u6280\u672f\u5c06\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u7684\u56fe\u5f62\u7ed8\u5236\u5728 WorkerW \u7a97\u53e3\u7684\u80cc\u666f\u4e0a\u3002<br \/>\n    <\/span>\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \u5916\u90e8\/\u6258\u7ba1\u6e32\u67d3<br \/>\n     <\/strong><br \/>\n     \uff1a\u8003\u8651\u662f\u5426\u53ef\u4ee5\u8c03\u6574 SHELL_DefView \u548c WorkerW \u7684\u6e32\u67d3\u8def\u5f84\u6765\u5728\u56fe\u6807\u5c42\u548c\u9759\u6001\u58c1\u7eb8\u5c42\u4e4b\u95f4\u7ed8\u5236\u52a8\u6001\u58c1\u7eb8\u3002\u5173\u4e8e\u4fee\u6539\u6e32\u67d3\u8def\u5f84\u7684\u65b9\u6cd5\u6d89\u53ca\u5230\u7a97\u53e3\u5b50\u7c7b\u5316\u3001GDI Alpha \u8fc7\u6ee4\u4ee5\u53ca\u5904\u7406\u00a0WM_ERASEBKGND \u6d88\u606f\u3002\u6b64\u7c7b\u52a8\u6001\u58c1\u7eb8\u5c06\u4e0d\u53d7\u7a97\u53e3\u5c42\u6b21\u548c\u900f\u660e\u7a7f\u900f\u7684\u5f71\u54cd\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06\u7a97\u53e3\u6e32\u67d3\u5230\u684c\u9762\u3002\u8be5\u601d\u8def\u5c31\u662f\u5728 XP \u7cfb\u7edf\u4e0a\u5b9e\u73b0\u52a8\u6001\u58c1\u7eb8\u7684\u76f8\u5173\u5f00\u6e90\u8f6f\u4ef6\u6240\u66fe\u91c7\u7528\u7684\u3002\uff08\u539f\u672c\u6211\u5c06\u5728\u7b2c\u4e8c\u7bc7\u4e2d\u9488\u5bf9 XP \u7cfb\u7edf\u7684\u9002\u914d\u6027\u8bb2\u89e3\u8be5\u65b9\u6cd5\uff09<br \/>\n    <\/span>\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \u4f7f\u7528\u81ea\u5b9a\u4e49\u7a97\u53e3\u5c42\u6b21<br \/>\n     <\/strong><br \/>\n     \uff08\u4fee\u6539\u7a97\u53e3\u5c42\u6b21\uff09\uff1a\u6784\u5efa\u65b0\u7684 WorkerW\uff0c\u5e76\u8c03\u6574\u7a97\u53e3\u5c42\u6b21\u6765\u5b9e\u73b0\u53cc\u5c42 WorkerW\u3002\u56e0\u4e3a\u521b\u5efa WorkerW \u7a97\u53e3\u6709\u672a\u88ab\u516c\u5f00\u7684 API\u3002\uff08\u8fd9\u5728\u6211\u4ee5\u524d\u53d1\u8fc7\u7684\u6587\u7ae0\u4e2d\u5c1d\u8bd5\u8fc7\uff0c\u4e0d\u8fc7\u6bd4\u8f83\u56f0\u96be\uff0c\u9700\u8981\u5904\u7406\u5b50\u7a97\u53e3\u6d88\u606f\u91cd\u65b0\u8f6c\u53d1\uff0c\u6d88\u606f\u98ce\u66b4\u95ee\u9898\uff0c\u8be5\u601d\u8def\u8fdd\u53cd\u4e86\u5fae\u8f6f\u7684 UI \u8bbe\u8ba1\u89c4\u8303\u3002\u521d\u6b65\u5b9e\u73b0\u4e86\u4e00\u90e8\u5206\u529f\u80fd\uff0c\u4f46\u56e0\u4e3a\u6709\u4e9b\u95ee\u9898\u6ca1\u6709\u5f97\u5230\u6709\u6548\u7684\u89e3\u51b3\uff0c\u6240\u4ee5\u90a3\u7bc7\u6587\u7ae0\u5c31\u88ab\u6211\u4e34\u65f6\u64a4\u56de\u9632\u6b62\u8bef\u4eba\u5b50\u5f1f\uff09<br \/>\n    <\/span>\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \u8986\u76d6\u7cfb\u7edf\u7684\u684c\u9762\u56fe\u6807\u5c42<br \/>\n     <\/strong><br \/>\n     \uff1a\u4f7f\u7528\u81ea\u5df1\u5b9e\u73b0\u7684\u684c\u9762\u56fe\u6807\u5c42\uff08\u7c7b\u4f3c\u4e8e\u684c\u9762\u6587\u4ef6\u5939\u76d2\u5b50\u7684\u5b9e\u73b0\u539f\u7406\uff09\uff0c\u53ef\u4ee5\u9009\u62e9\u540c\u65f6\u9690\u85cf\u7cfb\u7edf\u539f\u59cb\u7684\u684c\u9762\u56fe\u6807\u5c42\u3002\u8fd9\u4e5f\u662f\u5ef6\u7533\u81ea Start11 \u7b49\u5546\u4e1a\u5316\u7f8e\u5316\u5de5\u5177\u7684\u4e00\u8d2f\u601d\u8def\uff08\u8986\u76d6\u5fae\u8f6f\u7684\u5f00\u59cb\u83dc\u5355\u4efb\u52a1\u680f\u7b49\uff09\u3002\u8fd9\u53ef\u4ee5\u907f\u514d\u56e0\u5fae\u8f6f\u9891\u7e41\u5bf9 UI \u8bbe\u8ba1\u7684\u4fee\u6539\u5e26\u6765\u7684 \u201c\u4e0d\u517c\u5bb9-\u4fee\u590d\u517c\u5bb9-\u518d\u6b21\u4e0d\u517c\u5bb9\u201d \u6b7b\u5faa\u73af\u95ee\u9898\u3002<br \/>\n    <\/span>\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      Patch Explorer \u9759\u6001\u8865\u4e01\/\u70ed\u8865\u4e01<br \/>\n     <\/strong><br \/>\n     \uff1a\u62e6\u622a WorkerW \u548c SHELL_DefView \u7a97\u53e3\u521b\u5efa\u7684\u8fc7\u7a0b\uff0c\u66ff\u6362\u4e3a\u81ea\u5df1\u7684\u7a97\u53e3\u3002\u6216\u8005\u9006\u5411\u901a\u8fc7 BinDiff \u5bf9\u6bd4\u65b0\u65e7\u7248\u672c Explorer \u5728\u5b9e\u73b0\u7a97\u53e3\u5207\u6362\u6548\u679c\u673a\u5236(WorkerW)\u7684\u53d8\u5316\uff0c\u901a\u8fc7\u6253\u8865\u4e01\u4fee\u590d\u8fd9\u90e8\u5206\u529f\u80fd\u3002\u8be5\u601d\u8def\u53d7\u5f00\u6e90\u5de5\u5177 ExplorerPatcher \u7684\u4e00\u8d2f\u7684\u601d\u60f3\u542f\u53d1\u800c\u6765\u3002<br \/>\n    <\/span>\n   <\/li>\n<li>\n    <span style=\"color:#0d0016\"><br \/>\n     &#8230;&#8230;\uff08\u5176\u4ed6\uff09<br \/>\n    <\/span>\n   <\/li>\n<\/ol>\n<p>\n   \u8fd9\u4e9b\u601d\u8def\u76ee\u524d\u5904\u4e8e\u7f13\u6162\u5b9e\u9a8c\u9636\u6bb5\uff0c\u56e0\u4e3a\u6211\u8fd8\u6709\u5176\u4ed6\u7684\u4e8b\u60c5\u3002\u76f8\u5173\u66f4\u65b0\u5c06\u95f4\u65ad\u5730\u53d1\u5e03\u4e8e\u6211\u7684\u535a\u5ba2\u3002\n  <\/p>\n<p style=\"text-align:right\">\n   \u2014\u2014\u5199\u4e8e 2024 \u5e74 3 \u6708 17 \u65e5\u665a\n  <\/p>\n<h3 id=\"4.2%20%E7%9B%AE%E5%89%8D%E7%9A%84%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\">\n   <span style=\"color:#0d0016\"><br \/>\n    4.2 \u7a97\u53e3\u663e\u793a\u89e3\u51b3\u65b9\u6848\uff083 \u6708 24 \u65e5\uff09<br \/>\n   <\/span><br \/>\n  <\/h3>\n<p>\n   \u7ecf\u8fc7\u6d4b\u8bd5\uff0c\u6211\u4eec\u53d1\u73b0\uff0c\u666e\u901a Win32 \u7a97\u53e3\u5d4c\u5165\u552f\u4e00\u7684 WorkerW \u65f6\uff0c\u80cc\u666f\u4f1a\u88ab\u5b8c\u5168\u64e6\u9664\uff0c\u5bf9\u4e8e\u5b83\u7684\u5b50\u7a97\u53e3\u4e5f\u662f\u5982\u6b64\u3002\u4f7f\u7528 WebView2 \u7a97\u53e3\u3001mpv \u64ad\u653e\u5668\u7a97\u53e3\u76f4\u63a5\u7f6e\u7236\uff0c\u5219\u4e0d\u4f1a\u51fa\u73b0\u5b8c\u5168\u4e0d\u53ef\u89c1\u7684\u60c5\u51b5\u3002\u8fd9\u4e24\u6b3e\u8f6f\u4ef6\u4f7f\u7528\u7279\u6b8a\u7684\u6e32\u67d3\u65b9\u5f0f\uff0c\u800c\u4e0d\u91c7\u7528\u4f20\u7edf\u7684 Win32 \u7a97\u53e3\u7ed8\u5236\u65b9\u5f0f\u3002WebView2 \u7a97\u53e3\u4f7f\u7528 Windows \u7684 Direct Composition \u7b49\u6280\u672f\u5c06\u56fe\u50cf\u5408\u6210\u5230\u5c4f\u5e55\u3002\u800c mpv \u5219\u4f7f\u7528 DirectX \u6765\u6e32\u67d3\u56fe\u50cf\u3002\n  <\/p>\n<p>\n   \u6240\u4ee5\uff0c<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u76ee\u524d\u7684\u89e3\u51b3\u65b9\u6848\u662f\u76f4\u63a5\u5c06\u00a0WebView2Browser \u5d4c\u5165\u5230 WorkerW \u4e0b\uff0c\u5e76\u4fee\u6b63\u7a97\u53e3\u5168\u5c4f\u5c3a\u5bf8\uff0c\u800c\u4e0d\u95f4\u63a5\u7ecf\u8fc7\u4f20\u7edf\u7684 Win32 \u7a97\u53e3<br \/>\n   <\/span><br \/>\n   \u3002\n  <\/p>\n<p>\n   \u4f7f\u7528\u4e0b\u9762\u7684\u6a21\u677f\u4ee3\u7801\u4f7f\u7528 WebView2\uff1a<br \/>\n   <a href=\"https:\/\/learn.microsoft.com\/zh-cn\/microsoft-edge\/webview2\/samples\/webview2browser\" rel=\"nofollow\" title=\"Win32 \u793a\u4f8b WebView2Browser\"><br \/>\n    Win32 \u793a\u4f8b WebView2Browser<br \/>\n   <\/a><br \/>\n   \u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     WebView2Browser \u754c\u9762<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u9700\u8981\u76f4\u63a5\u5c06 D3D Window \u7684\u7236\u7a97\u53e3\u4f5c\u4e3a\u80cc\u677f\u5d4c\u5165 WorkerW \u7a97\u53e3\u3002\n  <\/p>\n<p>\n   Intermediate D3D Window \u662f\u4e00\u79cd D3D Window \u7684\u7a97\u53e3\u7c7b\u540d\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u9700\u8981\u5d4c\u5165\u7684\u7a97\u53e3<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u5173\u4e8e\u4f20\u7edf Win32 \u7a97\u53e3\u7684\u80cc\u666f\u88ab\u64e6\u9664\u7684\u539f\u56e0\uff0c\u4ee5\u53ca\u5982\u4f55\u4fee\u590d\u95ee\u9898\uff0c\u6709\u5f85\u672a\u6765\u89e3\u51b3\u3002\u4e34\u65f6\u5148\u91c7\u7528\u8be5\u65b9\u6cd5\u3002\n  <\/p>\n<p style=\"text-align:right\">\n   \u2014\u2014\u5199\u4e8e 2024 \u5e74 3 \u6708 24 \u65e5\u665a\n  <\/p>\n<h3 id=\"4.3%20%E6%9C%80%E6%96%B0%E7%9A%84%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%886%E6%9C%889%E6%97%A5%EF%BC%89\">\n   <span style=\"color:#0d0016\"><br \/>\n    4.3 \u6700\u65b0\u7684\u7a97\u53e3\u663e\u793a\u89e3\u51b3\u65b9\u6848\uff086 \u6708 9 \u65e5\uff09<br \/>\n   <\/span><br \/>\n  <\/h3>\n<blockquote>\n<p>\n    <strong><br \/>\n     <span style=\"color:#fe2c24\"><br \/>\n      \u6700\u65b0\u6d88\u606f(6.25)\uff1a\u7ecf\u9a8c\u8bc1\u548c\u4fee\u590d\uff0c<br \/>\n     <\/span><br \/>\n     <span style=\"color:#0d0016\"><br \/>\n      \u8be5\u65b9\u6cd5\u5728 Windows 11 24H2 \u4e13\u4e1a\u7248\u00a0Dev \u6e20\u9053 Build 26120.670\uff08Feature Experience Pack 1000.26100.6.0\uff09\u548c\u00a024H2\u00a0Canary \u6e20\u9053\uff08Build\u00a026080\uff09\u7248\u672c\u4e0a\u5747\u6b63\u5e38\u5de5\u4f5c\u3002\uff08\u76ee\u524d\u6301\u7eed\u66f4\u65b0\u7684 24H2 \u4e0a\uff0c\u6b64\u65b9\u6cd5\u4ecd\u7136\u6709\u6548\u3002\u4f46\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6b64\u65b9\u6cd5\u5229\u7528\u4e86\u9057\u7559\u7684\u7279\u6027\u6216\u8005\u79f0\u4e4b\u4e3a BUG \u4e5f\u4e0d\u4e3a\u8fc7\u3002\u6240\u4ee5\u5728\u672a\u6765\u7248\u672c\uff0c\u00a0MS \u7684\u5f00\u53d1\u8005\u53ef\u80fd\u610f\u8bc6\u5230\u8fd9\u91cc\u800c\u8fdb\u4e00\u6b65\u4fee\u8865\uff1b\u8001\u5b9e\u8bf4\uff0c\u53cc\u5c42 WorkerW \u7684\u65f6\u4ee3\u5df2\u7ecf\u8fc7\u53bb\uff09<br \/>\n     <\/span><br \/>\n    <\/strong>\n   <\/p>\n<\/blockquote>\n<p>\n   \u4e4b\u6240\u4ee5 Intermediate D3D Window \u7a97\u53e3\u548c MPV \u7a97\u53e3\u591f\u6b63\u5e38\u663e\u793a\uff0c\u662f\u56e0\u4e3a\u4ed6\u4eec\u7684\u7a97\u53e3\u5177\u6709\u7279\u6b8a\u7684\u7a97\u53e3\u6837\u5f0f\u3002\n  <\/p>\n<p>\n   \u9996\u5148\uff0c\u5982\u679c\u4e3a WorkerW \u7a97\u53e3\u8bbe\u7f6e\u591a\u4e2a\u5b50\u7a97\u53e3\uff0c\u5219\u5728\u91cd\u53e0\u5144\u5f1f\u7a97\u53e3\u65f6\uff0c\u9700\u8981\u8bbe\u7f6e<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     WS_CLIPSIBLINGS<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u3002\u53ea\u6709\u6b63\u786e\u8bbe\u7f6e\u8be5\u7a97\u53e3\u6837\u5f0f\uff0c\u624d\u80fd\u4f7f\u5f97 Z \u5e8f\u4f4e\u4e8e\u5f53\u524d\u7a97\u53e3\u7684\u5144\u5f1f\u7a97\u53e3\uff08\u540c\u7ea7\u7a97\u53e3\uff09\u526a\u5207\u91cd\u53e0\u90e8\u5206\u7684\u7ed8\u5236\uff0c\u5426\u5219\u5144\u5f1f\u7a97\u53e3\u53ef\u80fd\u8986\u76d6\u6b64\u7a97\u53e3\u3002<br \/>\n   <strong><br \/>\n    \u7531\u4e8e\u76ee\u524d\u7248\u672c\u4e2d\u7684 WorkerW \u7a97\u53e3\u9ed8\u8ba4\u5177\u6709 WS_CLIPSIBLINGS \u548c WS_CLIPCHILDREN \u7a97\u53e3\u6837\u5f0f\uff08\u5173\u4e8e\u8fd9\u4e24\u4e2a\u7a97\u53e3\u6837\u5f0f\u7684\u89e3\u91ca<br \/>\n    <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/u010003835\/article\/details\/46999589\" title=\"\u89c1\u6587\u7ae01\"><br \/>\n     \u89c1\u6587\u7ae01<br \/>\n    <\/a><br \/>\n    \u548c<br \/>\n    <a class=\"link-info\" href=\"https:\/\/www.cnblogs.com\/helloj2ee\/archive\/2009\/05\/29\/1491822.html\" rel=\"nofollow\" title=\"\u6587\u7ae0 2\"><br \/>\n     \u6587\u7ae0 2<br \/>\n    <\/a><br \/>\n    \uff09\uff0c\u6240\u4ee5\u8fd9\u4e00\u8bbe\u7f6e\u6211\u4eec\u53ef\u4ee5\u6682\u65f6\u5ffd\u7565\u3002<br \/>\n   <\/strong>\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6ce8\u610f\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff081\uff09\u5f53\u67d0\u4e2a\u5b50\u7a97\u53e3\u6536\u5230 WM_PAINT \u6d88\u606f\u65f6\uff0cWS_CLIPSIBLINGS \u6837\u5f0f\u4f1a\u5c06\u6240\u6709\u5176\u4ed6\u91cd\u53e0\u5b50\u7a97\u53e3\u526a\u5207\u51fa\u8981\u66f4\u65b0\u7684\u5b50\u7a97\u53e3\u533a\u57df\u3002\u5982\u679c\u672a\u6307\u5b9a WS_CLIPSIBLINGS \u4e14\u5b50\u7a97\u53e3\u91cd\u53e0\uff0c\u5219\u5728\u5b50\u7a97\u53e3\u7684\u5ba2\u6237\u533a\u5185\u7ed8\u5236\u65f6\uff0c\u53ef\u80fd\u4f1a\u5728\u76f8\u90bb\u5b50\u7a97\u53e3\u7684\u5ba2\u6237\u533a\u5185\u7ed8\u5236\uff08\u51fa\u73b0\u8986\u76d6\u73b0\u8c61\uff09\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff082\uff09\u6240\u6709\u91cd\u53e0\u5f0f\u548c\u5f39\u51fa\u5f0f\u7a97\u53e3\u90fd\u662f<br \/>\n    <\/span><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u9ed8\u8ba4\u5177\u6709<br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     WS_CLIPSIBLINGS \u7a97\u53e3\u6837\u5f0f\u7684\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u7a97\u53e3\u4e0d\u80fd\u6446\u8131 WS_CLIPSIBLINGS \u7a97\u53e3\u6837\u5f0f<br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \u5e76\u5728\u5176\u91cd\u53e0\u5f0f\u5144\u5f1f\u7a97\u53e3\u4e2d\u8fdb\u884c\u7ed8\u5236\u3002<br \/>\n    <\/span><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     \u53ea\u6709\u5b50\u7a97\u53e3\u7684\u00a0WS_CLIPSIBLINGS \u6837\u5f0f\u662f<br \/>\n     <strong><br \/>\n      \u53ef\u9009\u7684<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \u3002<br \/>\n    <\/span>\n   <\/p>\n<\/p>\n<p style=\"margin-left:0; text-align:left\">\n    <span style=\"color:#0d0016\"><br \/>\n     \u5982\u679c\u8981\u4fee\u6539\u7a97\u53e3\u6837\u5f0f\u7684\u7a97\u53e3\u53ea\u662f\u4e00\u4e2a\u5b50\u7a97\u53e3\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7 SetWindowLongPtr \u548c SetWindowPos \u6765\u6dfb\u52a0\/\u5220\u9664\u00a0 WS_CLIPSIBLINGS \u7a97\u53e3\u6837\u5f0f\u3002<br \/>\n    <\/span>\n   <\/p>\n<p style=\"margin-left:0; text-align:left\">\n<p style=\"margin-left:0; text-align:left\">\n    <span style=\"color:#0d0016\"><br \/>\n     \u6dfb\u52a0\u7684\u793a\u4f8b\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p style=\"margin-left:0; text-align:left\">\n<div class=\"img-center\">\n<figure class=\"image\">\n     <a href=\"https:\/\/i.sstatic.net\/vwr2R.png\" rel=\"nofollow\"><br \/>\n     <\/a><figcaption>\n      \u6dfb\u52a0 WS_CLIPSIBLINGS \u6837\u5f0f<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<p style=\"margin-left:0; text-align:left\">\n    <span style=\"color:#0d0016\"><br \/>\n     \u7136\u540e\u5c1d\u8bd5\u91cd\u7ed8\u8fd9\u4e24\u4e2a\u5b50\u7a97\u53e3\uff1a<br \/>\n    <\/span>\n   <\/p>\n<p style=\"margin-left:0; text-align:left\">\n<div class=\"img-center\">\n<figure class=\"image\">\n     <a href=\"https:\/\/i.sstatic.net\/XIa4H.png\" rel=\"nofollow\"><br \/>\n     <\/a><figcaption>\n      \u91cd\u7ed8\u540e\u7684\u6548\u679c<br \/>\n     <\/figcaption><\/figure>\n<\/p><\/div>\n<p style=\"margin-left:0; text-align:left\">\n    <span style=\"color:#0d0016\"><br \/>\n     \u53ef\u4ee5\u770b\u5230\u540c\u7ea7\u5b50\u7a97\u53e3\u7684\u5ba2\u6237\u533a\u4e2d\u91cd\u53e0\u533a\u57df\u88ab\u526a\u5207\u4e86\u3002<br \/>\n    <\/span>\n   <\/p>\n<p style=\"margin-left:0; text-align:left\">\n<p style=\"margin-left:0; text-align:left\">\n    \u53c2\u8003\u6587\u732e\uff1a<br \/>\n    <a href=\"https:\/\/stackoverflow.com\/questions\/56465781\/ws-clipsiblings-style-automatically-added\" rel=\"nofollow\" title=\"WS_CLIPSIBLINGS style automatically added - Stack Overflow\"><br \/>\n     WS_CLIPSIBLINGS style automatically added &#8211; Stack Overflow<br \/>\n    <\/a><br \/>\n    \u3002\n   <\/p>\n<\/blockquote>\n<p>\n   \u5176\u6b21\uff0c\u9700\u8981\u7ed9\u7a97\u53e3\u6dfb\u52a0\u5206\u5c42\u7a97\u53e3\u6269\u5c55\u6837\u5f0f\uff0c\u5373<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     WS_EX_LAYERED<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u7a97\u53e3\u6269\u5c55\u6837\u5f0f\uff0c\u7136\u540e\u5728\u663e\u793a\u7a97\u53e3\u4e4b\u524d\u8c03\u7528<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    <strong><br \/>\n     SetLayeredWindowAttributes(hwnd, 0, 255, LWA_ALPHA)<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u5c06\u7a97\u53e3\u663e\u793a\u51fa\u6765\uff08\u6b64\u5904\u7b80\u5355\u8bbe\u7f6e\u4e3a\u4e0d\u900f\u660e\uff09\u3002\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6ce8\u610f\uff1a\u5fc5\u987b\u5728\u8bbe\u7f6e WS_EX_LAYERED \u540e\u7acb\u5373\u8c03\u7528 SetLayeredWindowAttributes \u5206\u5c42\u7a97\u53e3\u6216\u8005 UpdateLayeredWindow \u4ee5\u4fbf\u4e8e\u4f7f\u5f97\u5206\u5c42\u6548\u679c\u751f\u6548\uff0c\u5426\u5219\u7a97\u53e3\u5c06\u65e0\u6cd5\u663e\u793a\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u7136\u540e\uff0c\u518d<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    \u5d4c\u5165\u552f\u4e00\u7684\u90a3\u4e2a WorkerW<br \/>\n   <\/span><br \/>\n   \uff08Z \u5e8f\u4f4e\u4e8e SHELL_DefView \u7684\u540c\u7ea7\u7a97\u53e3\uff09\uff0c\u6211\u4eec\u7684\u7a97\u53e3\u5c31\u53ef\u4ee5\u88ab\u6b63\u5e38\u663e\u793a\u51fa\u6765\u4e86\u3002\u6240\u4ee5\u8bf4\u95ee\u9898\u5e76\u4e0d\u662f\u7a97\u53e3\u662f\u5426\u91c7\u7528\u4e86 GPU \u52a0\u901f\u6e32\u67d3\uff0c\u56e0\u4e3a Intermediate D3D Window \u7a97\u53e3\u4e5f\u662f\u666e\u901a\u7a97\u53e3\uff0c\u53ea\u4e0d\u8fc7\u91c7\u7528\u4e86\u7279\u6b8a\u7684\u7a97\u53e3\u6837\u5f0f\u5c31\u53ef\u4ee5\u5728\u5d4c\u5165\u684c\u9762\u65f6\u6b63\u5e38\u5904\u7406 BufferRender\u3002\u5173\u4e8e\u8fd9\u4e2a\u7a97\u53e3\u5b58\u5728\u7684\u6280\u672f\u5185\u5bb9\u89c1\u6587\u7ae0\uff1a<br \/>\n   <a href=\"https:\/\/blog.csdn.net\/LIJIWEI0611\/article\/details\/133634078\" title=\"Chrome \u7a97\u53e3 - CSDN\u535a\u5ba2\"><br \/>\n    Chrome \u7a97\u53e3 &#8211; CSDN\u535a\u5ba2<br \/>\n   <\/a><br \/>\n   \u548c<br \/>\n   <a href=\"https:\/\/wy-ei.github.io\/notebook\/2016\/how-gpu-speed-up-page-render\/\" rel=\"nofollow\" title=\"Chrome \u4e2d\u7684 GPU \u52a0\u901f\u6e32\u67d3\u6280\u672f\"><br \/>\n    Chrome \u4e2d\u7684 GPU \u52a0\u901f\u6e32\u67d3\u6280\u672f<br \/>\n   <\/a><br \/>\n   \u3002\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6ce8\u610f\uff1a UWP \u5e94\u7528\uff08\u5c24\u5176\u662f\u5e94\u7528\u5546\u5e97\u5e94\u7528\uff09\u7684 FrameWindow\u3001CoreWindow \u7c7b\u7a97\u53e3\u4e0d\u80fd\u4f5c\u4e3a\u5b50\u7a97\u53e3\u5d4c\u5165 Win32 \u7a97\u53e3\uff08\u8fd9\u91cc\u4e3a WorkerW \u7a97\u53e3\uff09\uff0cSetParent \u51fd\u6570\u4f1a\u83b7\u5f97\u9519\u8bef\u4ee3\u7801 87-\u53c2\u6570\u9519\u8bef\u3002\u5fc5\u8981\u65f6\u9700\u8981\u91c7\u7528 WinRT\/Xaml \u6258\u7ba1 API \u624d\u53ef\u80fd\u5b9e\u73b0\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u4f7f\u7528\u00a0SetParent \u51fd\u6570\u8bbe\u7f6e\u7236\u7ea7\uff0c\u5c3d\u7ba1\u8fd9\u4e9b\u7a97\u53e3\u5e76\u4e0d\u662f\u5e7b\u5f71\u7a97\u53e3\u3002<br \/>\n    <\/span>\n   <\/p>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u6709\u5173\u5931\u8d25\u7684\u539f\u56e0\u53ef\u4ee5\u53c2\u8003\u6587\u7ae0\uff1a<br \/>\n    <\/span><br \/>\n    <a href=\"https:\/\/stackoverflow.com\/questions\/46784680\/in-wpf-control-display-a-uwp-app\" rel=\"nofollow\" title=\"display a UWP app - Stack Overflow\"><br \/>\n     display a UWP app &#8211; Stack Overflow<br \/>\n    <\/a><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \uff0c<br \/>\n    <\/span><br \/>\n    <a href=\"https:\/\/stackoverflow.com\/questions\/47451523\/embed-win32-app-inside-a-uwp-app\" rel=\"nofollow\" title=\"Embed Win32 App inside a UWP App - Stack Overflow\"><br \/>\n     Embed Win32 App inside a UWP App &#8211; Stack Overflow<br \/>\n    <\/a><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     \u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u5177\u4f53\u4fee\u6539<br \/>\n   <span style=\"color:#fe2c24\"><br \/>\n    DWORD mainWindowThread(void* argv) \u51fd\u6570<br \/>\n   <\/span><br \/>\n   \u5982\u4e0b\u4f4d\u7f6e\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u8bbe\u7f6e\u5206\u5c42\u7a97\u53e3\u548c\u7a97\u53e3\u526a\u5207\u6e32\u67d3\u6837\u5f0f\u4ee5\u4fbf\u4e8e\u517c\u5bb9 24H2<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p>\n   \u6700\u7ec8\u6548\u679c\uff1a\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6f14\u793a 24H2 \u5d4c\u5165\u7a97\u53e3\u90e8\u5206\uff08\u7247\u6bb5 1\uff09<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6f14\u793a 24H2 \u5d4c\u5165\u7a97\u53e3\u90e8\u5206\uff08\u7247\u6bb5 2\uff09<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u6f14\u793a 24H2 \u5d4c\u5165\u7a97\u53e3\u90e8\u5206\uff08\u7247\u6bb5 3\uff09<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p style=\"text-align:center\">\n<p style=\"text-align:right\">\n   \u2014\u2014\u5199\u4e8e 2024 \u5e74 6 \u6708 9 \u65e5\u665a\n  <\/p>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     \u4e00\u70b9\u8865\u5145\uff1a\u5728 24H2 \u4e0a\u5982\u679c\u6211\u4eec\u6b64\u65f6\u5c06\u7a97\u53e3\u7f6e\u4e8e WorkerW \u5904\uff0c\u6709\u65f6\u5019\u53ef\u80fd\u4f1a\u53d1\u73b0\u4f3c\u4e4e\u6ca1\u6709\u6548\u679c\uff1f\u4f46\u5c06\u9f20\u6807\u79fb\u5230\u4e00\u4e2a\u684c\u9762\u56fe\u6807\u4e0a\uff0c\u6211\u4eec\u53d1\u73b0\u684c\u9762\u597d\u50cf\u88ab\u6402\u4e86\u4e00\u4e2a\u6d1e\u3002\u8fd9\u662f\u56e0\u4e3a Windows \u5728\u684c\u9762\u5207\u6362\u65f6\u5bf9\u684c\u9762\u521b\u5efa\u4e86\u4e00\u4e2a\u5feb\u7167\u8986\u76d6\u5728\u58c1\u7eb8\u5c42\u4e0a\uff0c\u6765\u5b9e\u73b0\u5e73\u6ed1\u8fc7\u6e21\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u8ba9\u684c\u9762\u7a97\u53e3\u5c42\u5b8c\u5168\u91cd\u7ed8\u3002<br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<h3 id=\"4.4%20%E7%AA%97%E5%8F%A3%E6%98%BE%E7%A4%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%886%20%E6%9C%88%2011%20%E6%97%A5%20%7C%20%E5%AE%9E%E9%AA%8C%E6%80%A7%EF%BC%89\">\n   <strong><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     4.4 \u7a97\u53e3\u663e\u793a\u89e3\u51b3\u65b9\u6848\uff086 \u6708 11 \u65e5 | \u5b9e\u9a8c\u6027\uff09<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n  <\/h3>\n<blockquote>\n<p>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \u5b9e\u9a8c\u6027\u65b9\u6848\u63d0\u793a\uff1a\u6b64\u65b9\u6848\u5904\u4e8e\u5b9e\u9a8c\u72b6\u6001\uff08<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n    <span style=\"color:#fe2c24\"><br \/>\n     <strong><br \/>\n      \u4f46\u662f\uff0c6.9 \u7248\u672c\u662f\u76ee\u524d\u6bd4\u8f83\u7a33\u5b9a\u7684\u65b9\u6848<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n    <span style=\"color:#0d0016\"><br \/>\n     <strong><br \/>\n      \uff09\uff0c\u4e0d\u4fdd\u8bc1\u59cb\u7ec8\u6709\u6548\uff0c\u4e14\u53ef\u80fd\u5b58\u5728\u5df2\u77e5\u7684\u6280\u672f\u96be\u9898\u6216\u8005\u6f5c\u5728\u7684 BUG \u672a\u80fd\u591f\u5f97\u5230\u6709\u6548\u89e3\u51b3\u3002<br \/>\n     <\/strong><br \/>\n    <\/span>\n   <\/p>\n<\/blockquote>\n<p>\n   \u5df2\u77e5\u4f7f\u7528\u8bbe\u7f6e\u7236\u7a97\u53e3\u5e76\u4f9d\u8d56 0x052C \u6d88\u606f\u7684\u52a8\u6001\u58c1\u7eb8\u65b9\u6848\u6709\u5f88\u5927\u7684\u5c40\u9650\u6027\uff0c\u662f\u5426\u53ef\u4ee5\u4e0d\u8fc7\u591a\u5730\u4f9d\u8d56\u4e8e\u7a97\u53e3\u5c42\u6b21\u800c\u663e\u793a\u51fa\u52a8\u6001\u58c1\u7eb8\uff1f\u7b54\u6848\u662f\u80af\u5b9a\u7684\uff0c\u5e76\u4e14\u5fae\u8f6f\u4ee5\u524d\u7684 DreamScene \u52a8\u6001\u58c1\u7eb8\u65b9\u6848\u5c31\u662f\u8fd9\u4e48\u505a\u7684\u3002\u5df2\u77e5\u4f20\u7edf\u7684\u684c\u9762\u5237\u65b0\u901a\u8fc7 WM_ERASEBKGND \u6d88\u606f\u6765\u901a\u77e5\u56fe\u6807\u5c42\u5148\u7ed8\u5236\u58c1\u7eb8\u5c42\u56fe\u5f62\u7f13\u51b2\uff0c\u518d\u7ed8\u5236\u56fe\u6807\u5c42\u7684\u56fe\u5f62\u7f13\u51b2\u533a\u3002\u6240\u4ee5\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7a97\u53e3\u5b50\u7c7b\u5316\u63a5\u7ba1\u684c\u9762\u7a97\u53e3\u7684\u7ed8\u5236\uff0c\u5229\u7528 GDI Alpha \u901a\u9053\u7684\u8fc7\u6ee4\u548c BitBlt \u7ed8\u5236\u906e\u7f69\u548c\u9002\u5f53\u526a\u88c1\u56fe\u50cf\uff0c\u8fbe\u5230\u7ed8\u5236\u52a8\u6001\u58c1\u7eb8\u7a97\u53e3\u56fe\u50cf\u7684\u76ee\u7684\u3002\u4f46\u5728\u591a\u6570\u5904\u7406 0x052C \u6d88\u606f\u7684\u7cfb\u7edf\u4e0a\uff0c\u7236\u7a97\u53e3\u53d8\u4e3a WorkerW \u65f6\u4ece SHELL_DefView \u7a97\u53e3\u63a5\u6536\u4e0d\u5230 WM_ERASEBKGND \u6d88\u606f\uff0c\u5bfc\u81f4\u56fe\u5f62\u7ed8\u5236\u5931\u8d25\u3002\u4f46\u662f\uff0c\u4f9d\u7136\u53ef\u4ee5\u63a5\u6536\u5230 WM_NOTIFY \u5e76\u5305\u542b Code\uff1aNM_CUSTOMDRAW \u7684\u7f13\u51b2\u533a\u7ed8\u5236\u6d88\u606f\uff0c\u8fd9\u662f ListCtrl \u53ef\u4ee5\u7279\u6709\u7684 Custom Draw \u81ea\u5b9a\u4e49\u7ed8\u5236\u65b9\u6cd5\u3002\u5177\u4f53\u53ef\u4ee5\u53c2\u8003\uff1a<br \/>\n   <a href=\"https:\/\/www.cnblogs.com\/findumars\/p\/5402957.html\" rel=\"nofollow\" title=\"\u5168\u9762\u89e3\u8bfb WM_NOTIFY - findumars - \u535a\u5ba2\u56ed\"><br \/>\n    \u5168\u9762\u89e3\u8bfb WM_NOTIFY &#8211; findumars &#8211; \u535a\u5ba2\u56ed<br \/>\n   <\/a><br \/>\n   \u548c<br \/>\n   <a href=\"https:\/\/blog.csdn.net\/m0_37346206\/article\/details\/102689592\" title=\"NM_CUSTOMDRAW \u6d88\u606f - CSDN\u535a\u5ba2\"><br \/>\n    NM_CUSTOMDRAW \u6d88\u606f &#8211; CSDN\u535a\u5ba2<br \/>\n   <\/a><br \/>\n   \uff0c\u4f46\u6682\u672a\u5f04\u6e05\u695a\u5176\u662f\u5426\u548c\u56fe\u6807\u5c42\u7684\u7f13\u51b2\u533a\u6709\u5173\u3002\n  <\/p>\n<p>\n   \u76ee\u524d\u6211\u7684 \u201c\u7ed5\u9053\u201d \u65b9\u6cd5\u5c31\u662f\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5f00\u542f\u4e86 WorkerW \u7a97\u53e3\u5206\u5c42\uff0c\u5982\u679c\u5f00\u542f\u5219\u91cd\u542f explorer \u5e94\u7528\uff08\u4f7f\u7528 RM \u91cd\u542f\u7ba1\u7406\u5668\u4ee5\u4fbf\u4e8e\u4fdd\u5b58\u7528\u6237\u64cd\u4f5c\u8fdb\u884c\u53ef\u6062\u590d\u7684\u91cd\u542f\uff09\uff0c\u7136\u540e\u8fc7\u6ee4\u53d1\u9001\u7ed9 Program Manager \u7a97\u53e3\u7684 0x052C \u6d88\u606f\uff0c\u6765\u7981\u7528\u6b64\u7a97\u53e3\u5c42\u6b21\u3002\u6b64\u95ee\u9898\u6709\u5f85\u672a\u6765\u89e3\u51b3\uff0c\u5982\u679c\u4f60\u6709\u4efb\u4f55\u5efa\u8bae\u8bf7\u8054\u7cfb\u6211\u3002\n  <\/p>\n<div class=\"img-center\">\n<figure class=\"image\"><figcaption>\n     \u5b9e\u73b0\u6548\u679c\u5c55\u793a<br \/>\n    <\/figcaption><\/figure>\n<\/p><\/div>\n<p style=\"text-align:right\">\n   \u2014\u2014\u5199\u4e8e 2024 \u5e74 6 \u6708 13 \u65e5\n  <\/p>\n<hr\/>\n<h2 id=\"%E5%90%8E%E8%AE%B0\">\n   <span style=\"color:#0d0016\"><br \/>\n    \u4e94\u3001\u540e\u8bb0<br \/>\n   <\/span><br \/>\n  <\/h2>\n<p>\n   \u5173\u4e8e\u5982\u4f55\u5728 XP \u6216\u8005 Win 7 \u5173\u95ed DWM \u60c5\u51b5\u4e0b\u5d4c\u5165\u7a97\u53e3\uff0c\u5c06\u5728\u540e\u7eed\u6587\u7ae0\u4e2d\u8bb2\u89e3\uff0c\u5305\u62ec\u5236\u4f5c\u89c6\u9891\u52a8\u6001\u58c1\u7eb8\u4ee5\u53ca\u6d4f\u89c8\u5668\u52a8\u6001\u58c1\u7eb8\u524d\u7aef\u7a0b\u5e8f\u7684\u8bb2\u89e3\u3002\uff08 Vista \u6709\u70b9\u7279\u6b8a\uff0c\u5d4c\u5165\u7a97\u53e3\u6bd4\u8f83\u9ebb\u70e6\uff0c\u5177\u4f53\u65b9\u6cd5\u4f1a\u5728\u4ee5\u540e\u7684\u7cfb\u5217\u4e2d\u8bb2\u89e3 \uff09\n  <\/p>\n<hr\/>\n<p>\n   \u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\uff1a<br \/>\n   <a class=\"link-info\" href=\"https:\/\/blog.csdn.net\/qq_59075481\/article\/details\/125361650\" title=\"\u4ece\u96f6\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8 - \u6d9f\u5e7d516\"><br \/>\n    \u4ece\u96f6\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8 &#8211; \u6d9f\u5e7d516<br \/>\n   <\/a>\n  <\/p>\n<p>\n   \u53d1\u5e03\u4e8e\uff1a2023.10.09\uff0c\u66f4\u65b0\u4e8e\uff1a2024.03.24,\u00a02024.05.11, 2024.06.04 &#8211; 06.21 \/ 06.25, 2024.07.10, 2024.08.17, 2024.09.16 \/ 09.26.\n  <\/p>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \u4e00\u3001\u524d\u8a00 \u4e8c\u3001\u6709\u54ea\u4e9b\u57fa\u7840\u9700\u8981\u6211\u638c\u63e1\u7684\uff1f 1. Windows Aero \u4e0e\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09 1. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u4e00\u3001\u524d\u8a00 \u4e8c\u3001\u6709\u54ea\u4e9b\u57fa\u7840\u9700\u8981\u6211\u638c\u63e1\u7684\uff1f 1. Windows Aero \u4e0e\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09 1. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09-2\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-31T16:00:10+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"43 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09\",\"datePublished\":\"2025-03-31T16:00:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/\"},\"wordCount\":1786,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u52a8\u6001\u58c1\u7eb8\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/\",\"name\":\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-03-31T16:00:10+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wunen.com\/#website\",\"url\":\"https:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"https:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09-2\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u76ee\u5f55 \u4e00\u3001\u524d\u8a00 \u4e8c\u3001\u6709\u54ea\u4e9b\u57fa\u7840\u9700\u8981\u6211\u638c\u63e1\u7684\uff1f 1. Windows Aero \u4e0e\u684c\u9762\u7a97\u53e3\u7ba1\u7406\u5668\uff08DWM\uff09 1. [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09-2\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-03-31T16:00:10+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"43 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09","datePublished":"2025-03-31T16:00:10+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/"},"wordCount":1786,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u52a8\u6001\u58c1\u7eb8"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/","name":"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-03-31T16:00:10+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/%e5%ae%9e%e7%8e%b0%e6%a1%8c%e9%9d%a2%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%ef%bc%88%e4%b8%80%ef%bc%89-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"\u5b9e\u73b0\u684c\u9762\u52a8\u6001\u58c1\u7eb8\uff08\u4e00\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wunen.com\/#website","url":"https:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"https:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=348"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}