{"id":42003,"date":"2003-10-29T10:43:00","date_gmt":"2003-10-29T10:43:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2003\/10\/29\/drawing-an-active-looking-caption-even-when-not-active\/"},"modified":"2003-10-29T10:43:00","modified_gmt":"2003-10-29T10:43:00","slug":"drawing-an-active-looking-caption-even-when-not-active","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20031029-00\/?p=42003","title":{"rendered":"Drawing an active-looking caption even when not active"},"content":{"rendered":"<p>\n        &#8220;Why would somebody ever want to do that?&#8221; you might ask. Well, this is a common appearance\n        for floating toolbars. (But aside from that case, I can&#8217;t think of any other valid\n        reason to draw a window as active even though it isn&#8217;t.)\n    <\/p>\n<p>\n        Fortunately this is easy to do. Just add this line to the <code>WndProc<\/code> of\n        our scratch program:\n    <\/p>\n<pre>    case WM_NCACTIVATE: if (wParam == FALSE) wParam = TRUE; break;\n<\/pre>\n<p>\n        This says, &#8220;If Windows asks me to paint my caption bar in the inactive state, turn\n        around and draw it in the active state.&#8221;\n    <\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Why would somebody ever want to do that?&#8221; you might ask. Well, this is a common appearance for floating toolbars. (But aside from that case, I can&#8217;t think of any other valid reason to draw a window as active even though it isn&#8217;t.) Fortunately this is easy to do. Just add this line to the [&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-42003","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>&#8220;Why would somebody ever want to do that?&#8221; you might ask. Well, this is a common appearance for floating toolbars. (But aside from that case, I can&#8217;t think of any other valid reason to draw a window as active even though it isn&#8217;t.) Fortunately this is easy to do. Just add this line to the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/42003","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=42003"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/42003\/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=42003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=42003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=42003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}