{"id":26043,"date":"2007-07-12T10:00:00","date_gmt":"2007-07-12T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2007\/07\/12\/if-you-want-a-modeless-dialog-then-create-a-modeless-dialog-already\/"},"modified":"2007-07-12T10:00:00","modified_gmt":"2007-07-12T10:00:00","slug":"if-you-want-a-modeless-dialog-then-create-a-modeless-dialog-already","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20070712-00\/?p=26043","title":{"rendered":"If you want a modeless dialog, then create a modeless dialog already"},"content":{"rendered":"<p> Somebody I&#8217;d never heard of sent me email with a general programming question. (This is one of the top ways of instantly <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2005\/11\/25\/496955.aspx\"> making me not interested in talking to you<\/a>.) <\/p>\n<blockquote class=\"q\"><p> I have a modal dialog box which I hide with <code>ShowWindow(SW_HIDE)<\/code>, and I want to enable the parent window so the parent window will get focus and keyboard input. Is this possible? If so, how do I do it? MSDN says &#8220;Although a dialog box procedure could potentially enable the owner window at any time, enabling the owner defeats the purpose of the modal dialog box and is not recommended.&#8221; How do I go about enabling the parent window? <\/p><\/blockquote>\n<p> This is like asking for a cheeseburger and then trying to peel every last bit of cheese off the patty to turn it into a plain hamburger. Since the cheese has already melted into the crevices of the burger, you&#8217;re going to be picking off tiny flecks of cheese for a long time. If you want a modeless dialog box, then just make a modeless dialog box. (This is what MSDN is trying to tell you in slightly more polite language.) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Somebody I&#8217;d never heard of sent me email with a general programming question. (This is one of the top ways of instantly making me not interested in talking to you.) I have a modal dialog box which I hide with ShowWindow(SW_HIDE), and I want to enable the parent window so the parent window will get [&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-26043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Somebody I&#8217;d never heard of sent me email with a general programming question. (This is one of the top ways of instantly making me not interested in talking to you.) I have a modal dialog box which I hide with ShowWindow(SW_HIDE), and I want to enable the parent window so the parent window will get [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/26043","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=26043"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/26043\/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=26043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=26043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=26043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}