{"id":5113,"date":"2013-02-28T07:00:00","date_gmt":"2013-02-28T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2013\/02\/28\/is-there-a-way-to-specify-an-icon-to-appear-next-to-a-menu-item-via-the-resource-template\/"},"modified":"2013-02-28T07:00:00","modified_gmt":"2013-02-28T07:00:00","slug":"is-there-a-way-to-specify-an-icon-to-appear-next-to-a-menu-item-via-the-resource-template","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20130228-00\/?p=5113","title":{"rendered":"Is there a way to specify an icon to appear next to a menu item via the resource template?"},"content":{"rendered":"<p><a href=\"http:\/\/msdn.microsoft.com\/library\/ms647578.aspx\"> The <code>MENU&shy;ITEM&shy;INFO<\/code> structure<\/a> lets you specify a bitmap to appear next to the menu item. Is there a way to do this from a menu resource template?<\/p>\n<p> No. <\/p>\n<p> If you look at <a href=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2008\/07\/16\/8735896.aspx\"> the format of menu templates<\/a>, you&#8217;ll see that there is nowhere to specify a bitmap. <\/p>\n<p> Which kind of makes sense, because it is the responsibility of the application to destroy the bitmap referenced by the <code>hbmpItem<\/code> member when the menu is destroyed, but if you created the menu from a template, you don&#8217;t know what that handle is, so you can&#8217;t destroy it either! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The MENU&shy;ITEM&shy;INFO structure lets you specify a bitmap to appear next to the menu item. Is there a way to do this from a menu resource template? No. If you look at the format of menu templates, you&#8217;ll see that there is nowhere to specify a bitmap. Which kind of makes sense, because it is [&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-5113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>The MENU&shy;ITEM&shy;INFO structure lets you specify a bitmap to appear next to the menu item. Is there a way to do this from a menu resource template? No. If you look at the format of menu templates, you&#8217;ll see that there is nowhere to specify a bitmap. Which kind of makes sense, because it is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/5113","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=5113"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/5113\/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=5113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=5113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=5113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}