title: Using GetSaveFileName. I specify OFN_EXPLORER flag, but always get old dialog appearance unless I avoid using both hook and template
body: <p>Using GetSaveFileName. I specify the OFN_EXPLORER flag, but I always get old dialog appearance unless I avoid using both hook and template.  (lpfnHook and lpfnTemplate (and their respective "enable" flags) in OPENFILENAME structure)  </p>
  
  <p>If I avoid using just one or the other, I still get the old dialog appearance.   I also tried no template, but use the hook... but always return TRUE from it (I saw mention of "always returning false" from the hook as a way to GET the old interface).  It didn't seem to have any effect, though.</p>
  
  <p>EDIT: Added relevant code:</p>
  
  <pre><code>ofn.lStructSize=sizeof(OPENFILENAME);
  ofn.hInstance=RhInst;
  ofn.hwndOwner=MainWh;
  ofn.lpstrFilter=s;
  ofn.lpstrCustomFilter=null;
  ofn.nMaxCustFilter=0;
  ofn.nFilterIndex=sel;
  
  ofn.lpstrFile=fname;
  ofn.nMaxFile=lstrl;
  ofn.lpstrFileTitle=tfile;
  ofn.nMaxFileTitle=lstrl;
  
  if (path &amp;&amp; lstrlen(path)) ofn.lpstrInitialDir=path;
  else ofn.lpstrInitialDir=drive;
  
  lstrcpy(SE_DefExt,ext);
  ofn.lpstrDefExt=SE_DefExt;
  if (titleid) ofn.lpstrTitle=title;
  else ofn.lpstrTitle=null;
  
  ofn.lpfnHook=(CommHookProc)MakeProcInstance((FARPROC)SEOpen32Hook,hInst);
  ofn.lpTemplateName=NULL;
  ofn.Flags=OFN_SHOWHELP | OFN_OVERWRITEPROMPT | OFN_ENABLEHOOK  | OFN_EXPLORER
              | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
  
  if(allowfit)
      {
      ofn.lpTemplateName = MAKEINTRESOURCE(SAVETOFIT);
      ofn.Flags |= OFN_ENABLETEMPLATE;
      }
  
  if (GetSaveFileName(&amp;ofn))
      {
      // &lt;snip&gt;
      }
  </code></pre>
  
  <p>Note that "allowfit" is non-zero/true in this case.  If I comment out the setting of the flag for both OFN_ENABLEHOOK and OFN_ENABLETEMPLATE, I get the "new" dialog appearance.</p>
  
  <p>**EDIT 2:<br>
  It looks now like I was confused on what I was seeing.  I believe in both cases, I'm getting the "new" OFN_EXPLORER behavior and appearance.  When I remove the OFN_EXPLORER flag, I get a very old style dialog box.  </p>
  
  <p>What I am trying to get to is the style of Save File dialog that has the Back and Forward button in the upper right, and (most importantly) an address box that I can type in.  All my previous comments and code descriptions (above) still apply; when I remove the Template and the Hook, I get my "back &amp; forward" buttons, and my typeable address box (plus left-side browse tree)... when I leave the template and the hook in place -- I do not (instead has "Save in" picklist at top, and "standard places" along the left ("Recent places", "Desktop", ...).</p>