{"id":30603,"date":"2006-07-07T10:00:00","date_gmt":"2006-07-07T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2006\/07\/07\/no-really-why-is-it-160x31\/"},"modified":"2006-07-07T10:00:00","modified_gmt":"2006-07-07T10:00:00","slug":"no-really-why-is-it-160x31","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20060707-00\/?p=30603","title":{"rendered":"No, really, why is it 160&#215;31?"},"content":{"rendered":"<p>When I discussed some time ago <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2005\/02\/10\/370445.aspx\"> why minimized windows have an apparent size of 160&#215;31<\/a>, I explained that the minimized icon is a miniature title bar, but I managed not to explain why the values are exactly 160 and 31.\n The width of the miniature title bar is determined by the <code>iWidth<\/code> member of <code>MINIMIZEDMETRICS<\/code> structure. You can retrieve and change this structure with the help of the <code>SystemParametersInfo<\/code> function. (Use the <code>SPI_GETMINIMIZEDMETRICS<\/code> and <code>SPI_SETMINIMIZEDMETRICS<\/code> flags, respectively.) Some people will mention the <code>MinWidth<\/code> registry value, but those people are wrong. Notice, for example, that messing with <code>MinWidth<\/code> requires a logoff cycle, whereas using <code>SPI_SETMINIMIZEDMETRICS<\/code> takes effect immediately. That&#8217;s because <code>SPI_SETMINIMIZEDMETRICS<\/code> updates the internal state variables, whereas whacking the registry just change a value in a database that nobody pays attention to once you&#8217;ve logged on.<\/p>\n<p> What about the height? That&#8217;s just the height of a caption bar, which you can adjust from the Appearance tab of the Display control panel. (Programmatically, you can use that helpful <code>SystemParametersInfo<\/code> function, this time using the <code>iCaptionHeight<\/code> member of the <code>NONCLIENTMETRICS<\/code> structure.) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I discussed some time ago why minimized windows have an apparent size of 160&#215;31, I explained that the minimized icon is a miniature title bar, but I managed not to explain why the values are exactly 160 and 31. The width of the miniature title bar is determined by the iWidth member of MINIMIZEDMETRICS [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-30603","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>When I discussed some time ago why minimized windows have an apparent size of 160&#215;31, I explained that the minimized icon is a miniature title bar, but I managed not to explain why the values are exactly 160 and 31. The width of the miniature title bar is determined by the iWidth member of MINIMIZEDMETRICS [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/30603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=30603"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/30603\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=30603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=30603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=30603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}