Platforms to show: All Mac Windows Linux Cross-Platform

WinFileOpenDialogMBS class

Super class: WinFileDialogMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Navigation MBS WinFrameworks Plugin 20.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Function: Extends the WinFileDialogMBS interface by adding methods specific to the open dialog.
Requires Windows Vista or newer.
All methods may raise WinFileDialogExceptionMBS in case of errors.
Subclass of the WinFileDialogMBS class.

Feedback, Comments & Corrections

Super class WinFileDialogMBS

Control States

Constant Value Description
kControlStateEnabled 1 The control is active.
kControlStateEnableVisible 3 The control is visible and enabled.
kControlStateInactive 0 The control is inactive and cannot be accessed by the user.
kControlStateVisible 2 The control is visible. The absence of this value indicates that the control is hidden.

Option Flags

Constant Value Description
kOptionsAllNonStorageItems &h80 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 kOptionsForceFileSystem.
kOptionsAllowMultiSelect &h200 Enables the user to select multiple items in the open dialog. Note that when this flag is set, the WinFileOpenDialogMBS class must be used to retrieve those items.
kOptionsCreatePrompt &h2000 Prompt for creation if the item returned in the save dialog does not exist. Note that this does not actually create the item.
kOptionsDefaultNoMiniMode &h20000000 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.
kOptionsDontAaddToRecent &h2000000 Do not add the item being opened or saved to the recent documents list.
kOptionsFileMustExist &h1000 The item returned must exist. This is a default value for the Open dialog.
kOptionsForceFileSystem &h40 Ensures that returned items are file system items. Note that this does not apply to items returned by CurrentSelection.
kOptionsForcePreviewPaneOn &h40000000 Indicates to the Open dialog box that the preview pane should always be displayed.
kOptionsForceShowHidden &h10000000 Include hidden and system items.
kOptionsHideMRUPlaces &h20000 Hide the list of places from which the user has recently opened or saved items. This value is not supported as of Windows 7.
kOptionsHidePinnedPlaces &h40000 Hide items shown by default in the view's navigation pane. This flag is often used in conjunction with the 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.
kOptionsNoChangeDir 8 Don't change the current working directory.
kOptionsNoDereferenceLinks &h100000 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.
kOptionsNoReadOnlyReturn &h8000 Do not return read-only items. This is a default value for the Save dialog.
kOptionsNoTestFileCreate &h10000 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.
kOptionsNoValidate &h100 Do not check for situations that would prevent an application from opening the selected file, such as sharing violations or access denied errors.
kOptionsOKButtonNeedsInteraction &h200000 OKButton needs interaction?
kOptionsOverwritePrompt 2 When saving a file, prompt before overwriting an existing file of the same name. This is a default value for the Save dialog.
kOptionsPathMustExist &h800 The item returned must be in an existing folder. This is a default value.
kOptionsPickFolders &h20 Present an Open dialog that offers a choice of folders rather than files.
kOptionsShareaware &h4000 In the case of a sharing violation when an application is opening a file, call the application back through ShareViolation event for guidance. This flag is overridden by kOptionsNoValidate.
kOptionsStrictFileTypes 4 In the Save dialog, only allow the user to choose a file that has one of the file name extensions specified through SetFileTypes.
kOptionsSupportsStreamableItems &h80000000 Indicates that the caller is opening a file as a stream (BHID_Stream), so there is no need to download that file.

Overwrite Responses

Constant Value Description
kOverwriteAccept 1 The application has determined that the file should be returned from the dialog.
kOverwriteDefault 0 The application has not handled the event. The dialog displays a UI asking the user whether the file should be overwritten and returned from the dialog.
kOverwriteRefuse 2 The application has determined that the file should not be returned from the dialog.

Share Violation Responds

Constant Value Description
kShareViolationAccept 1 The application has determined that the file should be returned from the dialog.
kShareViolationDefault 0 The application has not handled the event. The dialog displays a UI that indicates that the file is in use and a different file must be chosen.
kShareViolationRefuse 2 The application has determined that the file should not be returned from the dialog.

This class has no sub classes.

Some examples using this class:

Blog Entries


The items on this page are in the following plugins: MBS WinFrameworks Plugin.

WinFileDialogObserverMBS   -   WinFileSaveDialogMBS

The biggest plugin in space...

MBS Xojo Chart Plugins

Start Chat