{"id":3070,"date":"2020-04-13T21:21:43","date_gmt":"2020-04-13T13:21:43","guid":{"rendered":"https:\/\/www.aoisnow.net\/blog\/?p=3070"},"modified":"2020-04-13T21:21:43","modified_gmt":"2020-04-13T13:21:43","slug":"tont-36483-%e4%b8%ba%e4%bb%80%e4%b9%88%e6%9c%80%e5%b0%8f%e5%8c%96%e7%9a%84%e7%aa%97%e5%8f%a3%e5%85%b7%e6%9c%89%e5%bd%a2%e5%bc%8f%e4%b8%8a%e7%9a%84160x31%e7%9a%84%e5%b0%ba%e5%af%b8%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.aoisnow.net\/blog\/archives\/3070","title":{"rendered":"TONT 36483 \u4e3a\u4ec0\u4e48\u6700\u5c0f\u5316\u7684\u7a97\u53e3\u5177\u6709\u5f62\u5f0f\u4e0a\u7684160\u00d731\u7684\u5c3a\u5bf8\uff1f"},"content":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050210-00\/?p=36483\" target=\"_blank\" rel=\"noopener\">https:\/\/devblogs.microsoft.com\/oldnewthing\/20050210-00\/?p=36483<\/a><\/p>\n<p>We discussed a few months ago the issue of where windows minimized to before the taskbar was invented. In the modern taskbar world, why do minimized windows have an apparent size of 160\u00d731?<\/p>\n<p>\u51e0\u4e2a\u6708\u524d\uff0c\u6211\u4eec\u8ba8\u8bba\u8fc7\u5728\u4efb\u52a1\u680f\u53d1\u660e\u4e4b\u524d\u7684\u6700\u5c0f\u5316\u7a97\u53e3\u7684\u95ee\u9898\u3002\u90a3\u4e48\u5728\u5982\u4eca\u4efb\u52a1\u680f\u4e00\u7edf\u5929\u4e0b\u7684\u65f6\u4ee3\uff0c\u4e3a\u4ec0\u4e48\u6700\u5c0f\u5316\u7684\u7a97\u53e3\u4f1a\u6709\u4e00\u4e2a\u5f62\u5f0f\u4e0a\u7684160\u00d731\u7684\u5c3a\u5bf8\u5462\uff1f<\/p>\n<p>The size isn\u2019t just apparent. That\u2019s really their size. You can see them, for example, if you fire up a program that uses the Multiple Document Interface.<\/p>\n<p>\u8fd9\u4e2a\u5c3a\u5bf8\u4e0d\u5149\u662f\u5f62\u5f0f\u4e0a\u7684\uff0c\u5b9e\u9645\u4e0a\u4e5f\u662f\u5982\u6b64\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u65b9\u5f0f\u89c2\u5bdf\u5230\u8fd9\u4e00\u70b9\uff0c\u4f8b\u5982\u542f\u52a8\u4e00\u4e2a\u98df\u7528\u4e86\u591a\u6587\u6863\u754c\u9762\uff08MDI\uff09\u7684\u7a0b\u5e8f\u3002<\/p>\n<p>\uff08\u8bd1\u6ce8\uff1a\u539f\u672c\u8fd9\u91cc\u6709\u4e00\u5f20\u56fe\u7247\uff0c\u4f46\u5df2\u7ecf\u5931\u6548\uff0c\u8bf7\u8fd0\u7528\u4f60\u7684\u60f3\u8c61\u529b\uff09<\/p>\n<p>Observe the appearance of the window \u201cBook1\u201d. This is a minimized window (though minimized to its MDI host rather than to the desktop). With the introduction of Windows Explorer, which put files on the desktop in the form of icons, it became necessary to change the appearance of minimized windows in order to avoid confusing a minimized program icon from a desktop icon. A minimized program, therefore, took the form of a miniature title bar.<\/p>\n<p>\u89c2\u5bdf\u8fd9\u4e2a\u53eb\u300eBook1\u300f\u7684\u7a97\u53e3\u7684\u5916\u89c2\u3002\u8fd9\u662f\u4e00\u4e2a\u6700\u5c0f\u5316\u7684\u7a97\u53e3\uff08\u5c3d\u7ba1\u662f\u6700\u5c0f\u5316\u5230\u5176MDI\u9876\u5c42\u7a97\u53e3\u800c\u4e0d\u662f\u684c\u9762\uff09\u3002\u5728\u5f15\u5165\u4e86Windows\u8d44\u6e90\u7ba1\u7406\u5668\u4e4b\u540e\uff0c\u684c\u9762\u4e0a\u5141\u8bb8\u4ee5\u56fe\u6807\u7684\u5f62\u5f0f\u653e\u7f6e\u6587\u4ef6\u4e86\uff0c\u4fee\u6539\u6700\u5c0f\u5316\u7a97\u53e3\u7684\u5f62\u5f0f\u4fbf\u53d8\u5f97\u6709\u5fc5\u8981\u8d77\u6765\uff0c\u4ee5\u9632\u4eba\u4eec\u5c06\u6700\u5c0f\u5316\u7684\u7a0b\u5e8f\u56fe\u6807\u4e0e\u6587\u4ef6\u56fe\u6807\u76f8\u6df7\u6dc6\uff08\u8bd1\u6ce8\uff1aWindows 95\u4e4b\u524d\u7248\u672c\u7684Windows\u6ca1\u6709\u4efb\u52a1\u680f\uff0c\u6700\u5c0f\u5316\u7684\u7a0b\u5e8f\u4f1a\u7f29\u5c0f\u4e3a\u300e\u684c\u9762\u300f\u4e0a\u7684\u4e00\u4e2a\u56fe\u6807\uff0c\u8fd9\u91cc\u7684\u684c\u9762\u6307\u7684\u662f\u300e\u7a0b\u5e8f\u7ba1\u7406\u5668\u300f\u80cc\u540e\u7684\u6574\u4e2a\u5c4f\u5e55\u7a7a\u95f4\uff0c\u4e0eWindows 95\u4e4b\u540e\u7684\u300e\u684c\u9762\u300f\u5e76\u4e0d\u662f\u540c\u4e00\u4e2a\u6982\u5ff5\uff09\u3002\u7531\u6b64\uff0c\u6700\u5c0f\u5316\u7684\u7a0b\u5e8f\u4f7f\u7528\u4e86\u7f29\u5c0f\u7684\u6807\u9898\u680f\u7684\u5f62\u5f0f\u3002<\/p>\n<p>The programming interface to minimized windows remained the same, for compatibility reasons. (And please let\u2019s just agree to disagree on whether backwards compatibility is a good thing or not.) That\u2019s why the function to tell whether a window is minimized continues to be called IsIconic, the message you receive when someone tries to restore a minimized program is still called WM_QUERYOPEN, and the OpenIcon function can still be used to \u201copen\u201d a minimized \u201cicon\u201d. All even though minimized windows haven\u2019t looked like icons for nearly ten years.<\/p>\n<p>\u9762\u5411\u6700\u5c0f\u5316\u7a97\u53e3\u7684\u7f16\u7a0b\u63a5\u53e3\uff08\u4e0e\u65e7\u7248Windows\uff09\u4fdd\u6301\u4e86\u4e00\u81f4\uff0c\u8fd9\u662f\u51fa\u4e8e\u517c\u5bb9\u6027\u7684\u8003\u8651\u3002\uff08\u81f3\u4e8e\u5411\u4e0b\u517c\u5bb9\u662f\u4e00\u4ef6\u597d\u4e8b\u8fd8\u662f\u574f\u4e8b\uff0c\u8bf7\u4fdd\u6301\u89c1\u4ec1\u89c1\u667a\u7684\u6001\u5ea6\u3002\uff09\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u7528\u6765\u5224\u65ad\u4e00\u4e2a\u7a97\u53e3\u662f\u5426\u6700\u5c0f\u5316\u7684\u65b9\u6cd5\u540d\u5ef6\u7eed\u4e86 IsIconic \u7684\u79f0\u547c\uff1a\u5f53\u7528\u6237\u5c1d\u8bd5\u590d\u539f\u6700\u5c0f\u5316\u7684\u7a0b\u5e8f\u65f6\uff0c\u7a0b\u5e8f\u83b7\u5f97\u4fe1\u606f\u4ecd\u7136\u53eb WM_QUERYOPEN\uff0c\u800c OpenIcon \u65b9\u6cd5\u4ecd\u7136\u53ef\u4ee5\u7528\u6765\u300e\u6253\u5f00\u300f\u4e00\u4e2a\u6700\u5c0f\u5316\u7684\u300e\u56fe\u6807\u300f\uff0c\u5c3d\u7ba1\u4fdd\u7559\u4e86\u4e0a\u8ff0\u8fd9\u4e9b\u7279\u6027\u7684\u540c\u65f6\uff0c\u6700\u5c0f\u5316\u7684\u7a97\u53e3\u5df2\u7ecf\u8ddf\u56fe\u6807\u7684\u957f\u76f8\u5927\u76f8\u5f84\u5ead\u5c06\u8fd1\u5341\u5e74\u4e86\u3002<\/p>\n<p>The OpenIcon function is just an old-fashioned way of saying ShowWindow(hwnd, SW_NORMAL), in the same way that the CloseWindow function (dating back to Windows 1.0) is an extremely old-fashioned way of saying ShowWindow(hwnd, SW_MINIMIZE).<\/p>\n<p>OpenIcon \u65b9\u6cd5\u4e0d\u8fc7\u662f ShowWindow(hwnd, SW_NORMAL) \u7684\u4e00\u79cd\u65e7\u5f0f\u53eb\u6cd5\uff0c\u4e0e\u6b64\u76f8\u540c\u7684\u8fd8\u6709 CloseWindow\uff08\u53ef\u4ee5\u8ffd\u6eaf\u5230 Windows 1.0\uff09\u4e5f\u53ea\u662f ShowWindow(hwnd, SW_MINIMIZE) \u76f8\u5bf9\u5e94\u7684\u8d85\u7ea7\u8001\u7684\u4e00\u79cd\u53eb\u6cd5\u800c\u5df2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/devblogs.microsoft.com\/oldnewthing\/2005021 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3070","post","type-post","status-publish","format-standard","hentry","category-tont_history"],"_links":{"self":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/comments?post=3070"}],"version-history":[{"count":0,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3070\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/media?parent=3070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/categories?post=3070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/tags?post=3070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}