Calling this function brings up the modal "Save File" dialog, with more control over
options than with getSaveFileName(). Note however that the "DIALOG FLAGS" construct
is not supported.
Instead, the extra sequence is a sequence of pairs
{field definition,field value}, where the field definition is a field of the
ID_OPENFILENAME structure. Do not change the fields that have been set from the other
function parameters! If a field is not provided, an appropriate default is assumed.
If the ofnFlags member appears in the extra sequence,
the value may be either an atom or a sequence, like for createEx(). Specifying a sequence
obliterates any default setting. Specifying an atom causes or'ing with whatever value
is already set. The default flags are
OFN_OVERWRITEPROMPT + OFN_HIDEREADONLY + OFN_PATHMUSTEXIST + OFN_EXPLORER.
file is a sequence holding the default file name.
filters is a list of patterns to limit displayed files to, in the format:
{ "text", pattern, "text", pattern ... }For example:
constant FileTypes = { "Text File", "*.TXT", "Euphoria Program", "*.EX;*.EXW;*.E;*.EW", "All Files", "*.*" }Note that a pattern can contain several different values, separated by semicolons.
The default for extra is the empty sequence {} causing the function to behave exactly like getSaveFileName. If a hook procedure is included in extra the flag OFN_ENABLEHOOK will be set. Beware that this may be cancelled if ofnFlags are specified as a sequence later. A standard hook procedure is available and may be included in extra as SaveHookProc, which is a pair {ofnHook,routine-id}. It may be one of several pairs or the only pair. If it is the only pair, it is specified as {SaveHookProc}, not just SaveHookProc. This hook procedure will cause the file extension in the Filename Combo box to be changed automatically whenever a filter choice is made. Example:
-- get file name to save, using the supplied hook procedure filename = getSaveFileName( TheWindow, -- parent window "MyImage.bmp", -- default name { "JPEG File", "*.JPG;*.JPE", -- JPEG files "BMP file", "*.BMP", -- BMP file "TIFF file", "*.TIF" }, -- TIFF file { SaveHookProc, (ofnFilterIndex, 2} } )