Export (0) Print
Expand All
Expand Minimize

FILEOPENDIALOGOPTIONS enumeration

Defines the set of options available to an Open or Save dialog.

Syntax


typedef enum _FILEOPENDIALOGOPTIONS { 
  FOS_OVERWRITEPROMPT         = 0x00000002,
  FOS_STRICTFILETYPES         = 0x00000004,
  FOS_NOCHANGEDIR             = 0x00000008,
  FOS_PICKFOLDERS             = 0x00000020,
  FOS_FORCEFILESYSTEM         = 0x00000040,
  FOS_ALLNONSTORAGEITEMS      = 0x00000080,
  FOS_NOVALIDATE              = 0x00000100,
  FOS_ALLOWMULTISELECT        = 0x00000200,
  FOS_PATHMUSTEXIST           = 0x00000800,
  FOS_FILEMUSTEXIST           = 0x00001000,
  FOS_CREATEPROMPT            = 0x00002000,
  FOS_SHAREAWARE              = 0x00004000,
  FOS_NOREADONLYRETURN        = 0x00008000,
  FOS_NOTESTFILECREATE        = 0x00010000,
  FOS_HIDEMRUPLACES           = 0x00020000,
  FOS_HIDEPINNEDPLACES        = 0x00040000,
  FOS_NODEREFERENCELINKS      = 0x00100000,
  FOS_DONTADDTORECENT         = 0x02000000,
  FOS_FORCESHOWHIDDEN         = 0x10000000,
  FOS_DEFAULTNOMINIMODE       = 0x20000000,
  FOS_FORCEPREVIEWPANEON      = 0x40000000,
  FOS_SUPPORTSTREAMABLEITEMS  = 0x80000000
} ; typedef DWORD FILEOPENDIALOGOPTIONS;

Constants

FOS_OVERWRITEPROMPT

When saving a file, prompt before overwriting an existing file of the same name. This is a default value for the Save dialog.

FOS_STRICTFILETYPES

In the Save dialog, only allow the user to choose a file that has one of the file name extensions specified through IFileDialog::SetFileTypes.

FOS_NOCHANGEDIR

Don't change the current working directory.

FOS_PICKFOLDERS

Present an Open dialog that offers a choice of folders rather than files.

FOS_FORCEFILESYSTEM

Ensures that returned items are file system items (SFGAO_FILESYSTEM). Note that this does not apply to items returned by IFileDialog::GetCurrentSelection.

FOS_ALLNONSTORAGEITEMS

Enables the user to choose any item in the Shell namespace, not just those with SFGAO_STREAM or SFAGO_FILESYSTEM attributes. This flag cannot be combined with FOS_FORCEFILESYSTEM.

FOS_NOVALIDATE

Do not check for situations that would prevent an application from opening the selected file, such as sharing violations or access denied errors.

FOS_ALLOWMULTISELECT

Enables the user to select multiple items in the open dialog. Note that when this flag is set, the IFileOpenDialog interface must be used to retrieve those items.

FOS_PATHMUSTEXIST

The item returned must be in an existing folder. This is a default value.

FOS_FILEMUSTEXIST

The item returned must exist. This is a default value for the Open dialog.

FOS_CREATEPROMPT

Prompt for creation if the item returned in the save dialog does not exist. Note that this does not actually create the item.

FOS_SHAREAWARE

In the case of a sharing violation when an application is opening a file, call the application back through OnShareViolation for guidance. This flag is overridden by FOS_NOVALIDATE.

FOS_NOREADONLYRETURN

Do not return read-only items. This is a default value for the Save dialog.

FOS_NOTESTFILECREATE

Do not test whether creation of the item as specified in the Save dialog will be successful. If this flag is not set, the calling application must handle errors, such as denial of access, discovered when the item is created.

FOS_HIDEMRUPLACES

Hide the list of places from which the user has recently opened or saved items. This value is not supported as of Windows 7.

FOS_HIDEPINNEDPLACES

Hide items shown by default in the view's navigation pane. This flag is often used in conjunction with the IFileDialog::AddPlace method, to hide standard locations and replace them with custom locations.

Windows 7 and later. Hide all of the standard namespace locations (such as Favorites, Libraries, Computer, and Network) shown in the navigation pane.

Windows Vista. Hide the contents of the Favorite Links tree in the navigation pane. Note that the category itself is still displayed, but shown as empty.

FOS_NODEREFERENCELINKS

Shortcuts should not be treated as their target items. This allows an application to open a .lnk file rather than what that file is a shortcut to.

FOS_DONTADDTORECENT

Do not add the item being opened or saved to the recent documents list (SHAddToRecentDocs).

FOS_FORCESHOWHIDDEN

Include hidden and system items.

FOS_DEFAULTNOMINIMODE

Indicates to the Save As dialog box that it should open in expanded mode. Expanded mode is the mode that is set and unset by clicking the button in the lower-left corner of the Save As dialog box that switches between Browse Folders and Hide Folders when clicked. This value is not supported as of Windows 7.

FOS_FORCEPREVIEWPANEON

Indicates to the Open dialog box that the preview pane should always be displayed.

FOS_SUPPORTSTREAMABLEITEMS

Indicates that the caller is opening a file as a stream (BHID_Stream), so there is no need to download that file.

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

IFileDialog::GetOptions
IFileDialog::SetOptions
IFileSaveDialog::GetOptions
IFileSaveDialog::SetOptions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft