{"id":102660,"date":"2019-07-05T07:00:00","date_gmt":"2019-07-05T14:00:00","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/oldnewthing\/?p=102660"},"modified":"2019-07-05T07:27:01","modified_gmt":"2019-07-05T14:27:01","slug":"20190705-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20190705-00\/?p=102660","title":{"rendered":"I set the <CODE>OFN_NONETWORKBUTTON<\/CODE> option in the <CODE>OPENFILENAME<\/CODE> structure, but it has no effect on the network item in the navigation pane"},"content":{"rendered":"<p>A customer set the <code>OFN_<\/code><code>NO\u00adNETWORK\u00adBUTTON<\/code> option in the <code>OPEN\u00adFILE\u00adNAME<\/code> structure, but it stil shows the <i>Network<\/i> item in the navigation pane.<\/p>\n<p>There are a number of flags in the <code>OPEN\u00adFILE\u00adNAME<\/code> structure which harken back to the old Windows 3.1-style dialog box. In Windows 3.1, the <i>Open<\/i> dialog had a button labeled <i>Network<\/i> that appeared next to the drives combo box. Clicking it let you map a new network drive. The <code>OFN_<\/code><code>NO\u00adNETWORK\u00adBUTTON<\/code> flag hides that button.<\/p>\n<p>But if you&#8217;re using the new Explorer-style <i>Open<\/i> dialog, there is no <i>Network<\/i> button to begin with, so there&#8217;s no button to hide.<\/p>\n<p>While it&#8217;s true that there is a <i>Network<\/i> item in the navigation pane, that is not the thing that the <code>OFN_<\/code><code>NO\u00adNETWORK\u00adBUTTON<\/code> flag controls. The purpose of the flag was not to hide the network; it was merely to hide the button that lets you map a new network drive. And since the Explorer-style dialog doesn&#8217;t have such a button in the first place, the flag is redundant.<\/p>\n<p>There&#8217;s another flag left over from the Windows 3.1 dialog: <code>OFN_<\/code><code>HIDE\u00adREAD\u00adONLY<\/code>. The original Windows 3.1 dialog had a separate check box called <i>Read-only<\/i>, but the Explorer style dialog doesn&#8217;t have that check box. Instead, the <i>Open<\/i> button is a split button, with options <i>Open<\/i> and <i>Open as read-only<\/i>. In this case, the <i>Open<\/i> dialog box was able to map the old flag to a corresponding feature in the new dialog.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>But hey, at least it&#8217;s not a button.<\/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-102660","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>But hey, at least it&#8217;s not a button.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/102660","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=102660"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/102660\/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=102660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=102660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=102660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}