{"id":36523,"date":"2005-02-04T07:01:00","date_gmt":"2005-02-04T07:01:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2005\/02\/04\/whats-the-deal-with-the-ds_shellfont-flag\/"},"modified":"2005-02-04T07:01:00","modified_gmt":"2005-02-04T07:01:00","slug":"whats-the-deal-with-the-ds_shellfont-flag","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050204-00\/?p=36523","title":{"rendered":"What&#039;s the deal with the DS_SHELLFONT flag?"},"content":{"rendered":"<p>It indicates that you want the Windows&nbsp;2000 default shell font. But that doesn&#8217;t mean that you&#8217;re going to get it.\n In order to indicate that you would like the &#8220;Windows&nbsp;2000&#8221; look for your dialog, <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/apcompat\/apcompat\/use_dialogex_to_have_the_system_font.asp\"> you have to do three things<\/a> and hope for a fourth:<\/p>\n<ol>\n<li>Use a <code>DIALOGEX<\/code> template instead of a <code>DIALOG<\/code> template. <\/li>\n<li>Set the <code>DS_SHELLFONT<\/code> flag in your dialog styles. <\/li>\n<li>Set the dialog font to &#8220;MS Shell Dlg&#8221;. <\/li>\n<li>Hope that you&#8217;re running on Windows 2000 or later     on a system that has the new Windows 2000 dialog font enabled. <\/li>\n<\/ol>\n<p> If all four conditions are satisfied, then your dialog gets the &#8220;Windows&nbsp;2000&#8221; look.\n If any condition fails, then you get the &#8220;classic&#8221; dialog font. Note that the fourth condition is not within your program&#8217;s control. Consequently, you have to make sure your dialog looks good in <strong>both<\/strong> the &#8220;classic&#8221; dialog font and the new one.\n For property sheet pages, things are more complicated.\n It would be visually jarring for there to be a mix of fonts on a property sheet. You wouldn&#8217;t want the &#8220;Advanced&#8221; button to be in MS Sans Serif but the &#8220;Apply&#8221; button in Tahoma. To avoid this problem, the property sheet manager looks at all the pages in the property sheet.  If they are all using the &#8220;Windows&nbsp;2000&#8221; look, then the property sheet uses the &#8220;Windows&nbsp;2000&#8221; look also. But if there is even a single page that does not use the &#8220;Windows&nbsp;2000&#8221; look, then the property sheet reverts to the &#8220;classic&#8221; look <strong>and also converts all the &#8220;Windows&nbsp;2000&#8221;-look pages to &#8220;classic&#8221; look<\/strong>.\n This way, all the pages in the property sheet have the &#8220;classic&#8221; look instead of having a mishmash of some pages with the classic look and some with the Windows&nbsp;2000 look.\n That&#8217;s why you will occasionally find that a shell property sheet <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2004\/02\/17\/74811.aspx#74927\"> has reverted to the &#8220;classic&#8221; look<\/a>. Some shell extension infected the property sheet with a page that does not have the &#8220;Windows&nbsp;2000&#8221; look, and for the sake of visual consistency, the property sheet manager set all the pages on the property sheet to &#8220;classic&#8221; look.<\/p>\n<p> This is another reason it is important that you test your property sheet pages both with the &#8220;Windows&nbsp;2000&#8221; look and the &#8220;classic&#8221; look. If your property sheet page ends up sharing a property sheet with a non-&#8220;Windows&nbsp;2000&#8221;-look page, your page is going to be reverted to &#8220;classic&#8221; look. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It indicates that you want the Windows&nbsp;2000 default shell font. But that doesn&#8217;t mean that you&#8217;re going to get it. In order to indicate that you would like the &#8220;Windows&nbsp;2000&#8221; look for your dialog, you have to do three things and hope for a fourth: Use a DIALOGEX template instead of a DIALOG template. Set [&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-36523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>It indicates that you want the Windows&nbsp;2000 default shell font. But that doesn&#8217;t mean that you&#8217;re going to get it. In order to indicate that you would like the &#8220;Windows&nbsp;2000&#8221; look for your dialog, you have to do three things and hope for a fourth: Use a DIALOGEX template instead of a DIALOG template. Set [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/36523","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=36523"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/36523\/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=36523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=36523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=36523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}