Standard file open/save as dialog box

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 6
Joined: Wed Aug 16, 2017 8:37 pm

Standard file open/save as dialog box

Post by btriffles »

I see that AkelPad has a customized file open/save as dialog box to provide the file preview, codepage option, etc. Although this is nice, the dialog box is missing a number of features that a standard, modern Windows file dialog box provides, such as:
  • Address bar that allows typed paths
  • Address bar with breadcrumbs
  • File search box
  • The folder tree on the left, including favorite/recent folders
  • The standard buttons/layout used by almost every other program
Possible solutions (if not already implemented?):
  1. It would be nice if AkelPad could add its custom features to a modern version of the Windows file dialog box.
  2. If that is too much work, the option to use the standard Windows file dialog box for all open and save as operations would be appreciated.
Thanks to everyone who contributes to this project!

Offline
Posts: 6
Joined: Wed Aug 16, 2017 8:37 pm

Post by btriffles »

If my reading on the Windows API is correct, it should be possible to enable a modern file open/save dialog by simply disabling the hook for the customized file dialog.

Specifically, in AkelPad.c, in both DoFileOpen() and DoFileSaveAs(), don't set the OFN_ENABLEHOOK parameter in ofn.Flags if the user sets an option to use a modern file dialog instead of AkelPad's customized file dialog.

Note that a modern Windows file dialog supports the Windows Explorer preview pane, which provides a preview of text files similar to AkelPad's customized dialog. (I don't know how it handles codepages, but that is a feature I don't really need in my file dialog.)

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

btriffles wrote:The folder tree on the left, including favorite/recent folders

Image


What OS do you using?

Offline
Posts: 6
Joined: Wed Aug 16, 2017 8:37 pm

Post by btriffles »

Sorry for not being clearer. What you have posted is a Windows XP-style file dialog. A "modern" file dialog (Common Item Dialog) is used by default in Windows Vista and up.
Here is a screenshot from notepad.exe in Windows 10:
Image
Note that the tree on the left shows favorite folders, recent folders, and a hierarchical tree of the file system as you browse the file system. You can also see the editable breadcrumb bar on top and the search box in the top-right. I've also enabled the preview pane so you can see how Windows provides a preview of text files.

By customizing the file dialog in AkelPad, it forces Windows to use the XP-style dialog. If you remove the customization, Windows Vista-10 should default to using the "modern" dialog that I have shown.
Post Reply