Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>getsavefilename()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetSaveFileName()
Get the name of a file to save into, from a dialog with the user
------------------------------------------------------------------------------

Syntax
GetSaveFileName( <hWnd>, <cFile>, [ <cTitle> ], [ <aFilter> ], [ <nFlags> ],
                 [ <cPath> ], [ <cDefExt> ] )  -->  cFileName

Arguments
<hWnd> is the handle of the window to be the parent (owner) of
the dialog.

<cFile> is a wildcard specification to search for.

<cTitle> is an optional string specifying the title of the
dialog box.

<aFilter> is an optional array of sub-arrays specifying a
series of wildcard file names the user can easily choose from.
Each sub-array is of the form
{ <cDescription>, <cWildcardList> }  where <cDescription> is a
string describing the <cWildcardList>, and <cWildcardList> is
a list of wild-card file names separated by semi-colons.

<nFlags> is an optional numeric used to control the dialog (a
combination of the  OFN_* values defined in commdlg.ch,
although you are very unlikely to use these).
(Default: OFN_NOREADONLYRETURN + OFN_OVERWRITEPROMPT).

<cPath> is an optional string specifying the default
directory.

<cDefExt> is an optional string specifying the default
filename extension to use.

Returns
If successful, the filename chosen by the user is returned.
If an error occurs or the user cancels the dialog, NIL is
returned.

Description
This function displays a dialog box to assist the user in
specifying a filename to be used by the application to save
(write) information.

(This function uses the familiar Save As common dialog.)


Example
cFile = GetSaveFileName( hWnd, "*.txt" )
if cFile != nil
     .
     .    // do something with cFile
     .
endif


See Also: GetOpenFileName() GetPrintDC()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson