Copyright © 2001-2018 MultiMedia Soft

CommonDialogShowSave method

Previous pageReturn to chapter overviewNext page

Remarks

 

Displays the standard dialog box used to select a file for saving. This method allows accessing filenames containing Unicode characters from development environments whose common dialog components don't manage Unicode natively like the "Microsoft Common Dialog Control" (ComDlg32.ocx) used by Visual Basic 6.

 

After choosing a destination file, you can access more detailed information about it through the CommonDialogGetInfoFromLastSave method.

 

For further information about dealing with Unicode characters, check the How to manage Unicode characters in filenames and tags tutorial.

 

 

Syntax

 

[Visual Basic]

control.CommonDialogShowSave (

strDialogTitle as string,

strInitialDirectory as string,

strFilter as string,

nFilterIndex as integer

) as String


 

[C++]

LPCTSTR control.CommonDialogShowSave (

BSTR strDialogTitle,

BSTR strInitialDirectory,

BSTR strFilter,

short *nFilterIndex

);


 

 

Parameter

Description

 

 

strDialogTitle

String representing the caption text of the dialog box.

strInitialDirectory

String representing the path of the directory where the browsing starts from.

strFilter

String representing the filter that let users limit which filenames appear for selection.

nFilterIndex

Reference that, on return from the method call, will contain the 1-based index of the filter selected by the user.

 

 

Return value

 

Value

Meaning

 

 

Empty string

The user pressed the Cancel button or didn't selected any file.

Valid string

The absolute pathname of the chosen file.