{"id":15043,"date":"2010-02-05T07:00:00","date_gmt":"2010-02-05T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2010\/02\/05\/why-doesnt-my-program-receive-the-wm_dwmsendiconicthumbnail-message-when-i-ask-for-an-iconic-representation\/"},"modified":"2010-02-05T07:00:00","modified_gmt":"2010-02-05T07:00:00","slug":"why-doesnt-my-program-receive-the-wm_dwmsendiconicthumbnail-message-when-i-ask-for-an-iconic-representation","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20100205-00\/?p=15043","title":{"rendered":"Why doesn&#039;t my program receive the WM_DWMSENDICONICTHUMBNAIL message when I ask for an iconic representation?"},"content":{"rendered":"<p>\nA customer was having trouble adding Windows&nbsp;7 taskbar\nintegration features to their application:\n<\/p>\n<blockquote CLASS=\"q\"><p>\nI&#8217;m trying to use the new Windows&nbsp;7 taskbar integration features,\nbut am running into a problem.\nI&#8217;ve made certain that my program has the\n<code>DWMWA_FORCE_ICONIC_REPRESENTATION<\/code>\nand\n<strike><code>DWMWA_HAS_ICONIC_BUTMAP<\/code><\/strike>\n<code>DWMWA_HAS_ICONIC_BITMAP<\/code> [corrected 8am]\nattributes set,\nyet I never receive a <code>WM_DWMSENDICONICTHUMBNAIL<\/code>\nmessage in my window procedure.\n<\/p><\/blockquote>\n<p>\nA member of the taskbar team invoked psychic powers:\n<\/p>\n<blockquote CLASS=\"m\">\n<p>\nIs your program running elevated by any chance?\nIf so, then you need to add the\n<code>WM_DWMSENDICONICTHUMBNAIL<\/code> message\nto your UIPI message filter:\n<\/p>\n<pre>\nChangeWindowMessageFilter(WM_DWMSENDICONICTHUMBNAIL, MSGFLT_ADD);\n<\/pre>\n<\/blockquote>\n<p>\nPsychic powers once again save the day.\n<\/p>\n<blockquote CLASS=\"q\"><p>\nThat was it. Thanks!\n<\/p><\/blockquote>\n<p>\nNote that forcing someone to invoke psychic powers is a <i>bad thing<\/i>.\nIt means that you withheld crucial information that somebody had to\nguess at.\nHere are some crucial pieces of information people tend to forget to\nmention:\n<\/p>\n<ul>\n<li>&#8220;Oh, did I mention that my process is running elevated?&#8221;\n<li>&#8220;Oh, did I mention that my process is a service?&#8221;\n<li>&#8220;Oh, did I mention that my process is 32-bit, running on a 64-bit machine?&#8221;\n<li>&#8220;Oh, did I mention that I initialized COM as MTA?&#8221;\n<li>&#8220;Oh, did I mention that my process is impersonating another user?&#8221;\n<li>&#8220;Oh, did I mention that I&#8217;m running a version of the operating\n    system different from Windows&nbsp;7?&#8221; (or whatever the most\n    current client operating system is)\n<\/ul>\n<p>\n<b>Added<\/b>:\nThe reason those items above are crucial pieces of information is that\nall of them (except the last one) are &#8220;game-changers&#8221;:\nIf you do any of the things in the list,\na whole bunch of rules change.\nIt&#8217;s like asking a question about traffic regulations and neglecting\nto mention that the other vehicle\nis a fire truck with its siren on.\n(And presumably when you chose to invoke any of those game-changing\nconditions, you were aware of the rules which applied to the new situation.\nThose rules are documented with the game-changing condition,\nnot with the general description of a normally-functioning universe.\nImagine if every physics book had the sentence &#8220;This rule does not apply\nto Superman&#8221; at the end of every paragraph.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A customer was having trouble adding Windows&nbsp;7 taskbar integration features to their application: I&#8217;m trying to use the new Windows&nbsp;7 taskbar integration features, but am running into a problem. I&#8217;ve made certain that my program has the DWMWA_FORCE_ICONIC_REPRESENTATION and DWMWA_HAS_ICONIC_BUTMAP DWMWA_HAS_ICONIC_BITMAP [corrected 8am] attributes set, yet I never receive a WM_DWMSENDICONICTHUMBNAIL message in my window [&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-15043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>A customer was having trouble adding Windows&nbsp;7 taskbar integration features to their application: I&#8217;m trying to use the new Windows&nbsp;7 taskbar integration features, but am running into a problem. I&#8217;ve made certain that my program has the DWMWA_FORCE_ICONIC_REPRESENTATION and DWMWA_HAS_ICONIC_BUTMAP DWMWA_HAS_ICONIC_BITMAP [corrected 8am] attributes set, yet I never receive a WM_DWMSENDICONICTHUMBNAIL message in my window [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/15043","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=15043"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/15043\/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=15043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=15043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=15043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}