{"id":21673,"date":"2008-07-10T10:00:00","date_gmt":"2008-07-10T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2008\/07\/10\/whats-the-deal-with-that-alternate-form-for-menu-item-template-separators\/"},"modified":"2008-07-10T10:00:00","modified_gmt":"2008-07-10T10:00:00","slug":"whats-the-deal-with-that-alternate-form-for-menu-item-template-separators","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20080710-00\/?p=21673","title":{"rendered":"What&#8217;s the deal with that alternate form for menu item template separators?"},"content":{"rendered":"<p><P>\n<A HREF=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2008\/07\/09\/8711897.aspx\">\nWe saw last time<\/A>\nthat you can specify a separator in a menu item template\nby specifying zero for everything,\neven though technically you&#8217;re supposed to pass\n<CODE>MFT_SEPARATOR<\/CODE> for the flags.\nWhat&#8217;s the deal with that alternate\nform for menu item template separators?\n<\/P>\n<P>\nThis goes back to the early days of the\n<CODE>InsertMenu<\/CODE> function\n(and its friends like\n<CODE>AppendMenu<\/CODE> and <CODE>ModifyMenu<\/CODE>).\n<A HREF=\"http:\/\/memory-alpha.org\/en\/wiki\/Miri_(episode)\">\nIn the Before Time<\/A>,\nthe way you specified a separator was to add a null pointer.\nNot a null string (a string with no characters, consisting only\nof the null terminator),\nbut an actual null pointer.\n<\/P>\n<PRE>\nAppendMenu(hmenu, MF_STRING, 0, NULL);\n<\/PRE>\n<P>\nThe recommended way of adding a separator is, of course,\nto use <CODE>MF_SEPARATOR<\/CODE>,\nbut this old-fashioned method is still supported for\nbackward compatibility.\nThe alternate form of the menu item template for separators\nis just a throwback to the days when this &#8220;old style&#8221; of\nadding a separator was in fact the only style.\n<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We saw last time that you can specify a separator in a menu item template by specifying zero for everything, even though technically you&#8217;re supposed to pass MFT_SEPARATOR for the flags. What&#8217;s the deal with that alternate form for menu item template separators? This goes back to the early days of the InsertMenu function (and [&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":[2],"class_list":["post-21673","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>We saw last time that you can specify a separator in a menu item template by specifying zero for everything, even though technically you&#8217;re supposed to pass MFT_SEPARATOR for the flags. What&#8217;s the deal with that alternate form for menu item template separators? This goes back to the early days of the InsertMenu function (and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/21673","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=21673"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/21673\/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=21673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=21673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=21673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}