{"id":18733,"date":"2009-03-23T10:00:00","date_gmt":"2009-03-23T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2009\/03\/23\/whats-the-point-of-the-movewindow-function-when-we-already-have-setwindowpos\/"},"modified":"2009-03-23T10:00:00","modified_gmt":"2009-03-23T10:00:00","slug":"whats-the-point-of-the-movewindow-function-when-we-already-have-setwindowpos","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20090323-00\/?p=18733","title":{"rendered":"What&#8217;s the point of the MoveWindow function when we already have SetWindowPos?"},"content":{"rendered":"<p>Commenter Phil Quirk notes via the suggestion box, &#8220;<a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/pages\/407234.aspx#544564\"><code>MoveWindow<\/code> is just a weird function. I guess it&#8217;s easier to call than <code>SetWindowPos<\/code>, but that&#8217;s the only thing it seems to have going for it<\/a>.&#8221;<\/p>\n<p> Yup, that&#8217;s about right. <\/p>\n<p> The <code>MoveWindow<\/code> function doesn&#8217;t really do anything you couldn&#8217;t already do yourself with <code>SetWindowPos<\/code>. It&#8217;s just a convenience function. And it you look at it pretty closely, it&#8217;s really not that big of a convenience either, saving you one parameter (<code>hwndInsertAfter<\/code>) and replacing the flag <code>SWP_NOREDRAW<\/code> with a boolean parameter. <\/p>\n<p> Whoop-dee-doo. <\/p>\n<p> It shouldn&#8217;t take too much imagination to figure out how this situation came about. It&#8217;s the same reason why you have both <code>CreateWindow<\/code> and <code>CreateWindowEx<\/code>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commenter Phil Quirk notes via the suggestion box, &#8220;MoveWindow is just a weird function. I guess it&#8217;s easier to call than SetWindowPos, but that&#8217;s the only thing it seems to have going for it.&#8221; Yup, that&#8217;s about right. The MoveWindow function doesn&#8217;t really do anything you couldn&#8217;t already do yourself with SetWindowPos. It&#8217;s just a [&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":[25],"class_list":["post-18733","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Commenter Phil Quirk notes via the suggestion box, &#8220;MoveWindow is just a weird function. I guess it&#8217;s easier to call than SetWindowPos, but that&#8217;s the only thing it seems to have going for it.&#8221; Yup, that&#8217;s about right. The MoveWindow function doesn&#8217;t really do anything you couldn&#8217;t already do yourself with SetWindowPos. It&#8217;s just a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/18733","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=18733"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/18733\/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=18733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=18733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=18733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}