{"id":103285,"date":"2020-01-01T07:00:00","date_gmt":"2020-01-01T15:00:00","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/oldnewthing\/?p=103285"},"modified":"2019-12-31T22:23:22","modified_gmt":"2020-01-01T06:23:22","slug":"20200101-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20200101-00\/?p=103285","title":{"rendered":"Nasty gotcha: Positioning your window beneath a topmost window makes it topmost"},"content":{"rendered":"<p>There&#8217;s a nasty gotcha with the <code>Defer\u00adWindow\u00adPos<\/code> function, and therefore any functions built on top of it, such as <code>Set\u00adWindow\u00adPos<\/code>: If you specify a <code>hwndInsertAfter<\/code>, and the insert-after window is topmost, then the window being positioned will be placed immediately after that window.<\/p>\n<p>So far so good.<\/p>\n<p>The hidden gotcha is that the window will be placed in the same zone as the insert-after window, which is the topmost zone.<\/p>\n<p>In other words, the window will be made topmost, even if it wasn&#8217;t topmost previously.<\/p>\n<p>Which is probably not what you were expecting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Picking up properties unintentionally.<\/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":[25],"class_list":["post-103285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Picking up properties unintentionally.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/103285","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=103285"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/103285\/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=103285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=103285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=103285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}