IFileDialog interface

Exposes methods that initialize, show, and get results from the common file dialog.

Members

The IFileDialog interface inherits from IModalWindow. IFileDialog also has these types of members:

Methods

The IFileDialog interface has these methods.

MethodDescription
AddPlace

Adds a folder to the list of places available for the user to open or save items.

Advise

Assigns an event handler that listens for events coming from the dialog.

ClearClientData

Instructs the dialog to clear all persisted state information.

Close

Closes the dialog.

GetCurrentSelection

Gets the user's current selection in the dialog.

GetFileName

Retrieves the text currently entered in the dialog's File name edit box.

GetFileTypeIndex

Gets the currently selected file type.

GetFolder

Gets either the folder currently selected in the dialog, or, if the dialog is not currently displayed, the folder that is to be selected when the dialog is opened.

GetOptions

Gets the current flags that are set to control dialog behavior.

GetResult

Gets the choice that the user made in the dialog.

SetClientGuid

Enables a calling application to associate a GUID with a dialog's persisted state.

SetDefaultExtension

Sets the default extension to be added to file names.

SetDefaultFolder

Sets the folder used as a default if there is not a recently used folder value available.

SetFileName

Sets the file name.

SetFileNameLabel

Sets the text of the label next to the file name edit box.

SetFileTypeIndex

Sets the file type that appears as selected in the dialog.

SetFileTypes

Sets the file types that the dialog can open or save.

SetFilter

Deprecated in Windows 7. Sets the filter.

SetFolder

Sets a folder that is always selected when the dialog is opened, regardless of previous user action.

SetOkButtonLabel

Sets the text of the Open or Save button.

SetOptions

Sets flags to control the behavior of the dialog.

SetTitle

Sets the title of the dialog.

Unadvise

Removes an event handler that was attached through the IFileDialog::Advise method.

 

Remarks

When to Implement

IFileDialog is implemented by the common file dialog browser.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IFileOpenDialog
IFileSaveDialog

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.