IFileDialog2 class com

Extends the IFileDialog interface by providing methods that allow the caller to name a specific, restricted location that can be browsed in the common file dialog as well as to specify alternate text to display as a label on the Cancel button.

To learn more, see learn.microsoft.com/windows/win32/api/shobjidl/nn-shobjidl-ifiledialog2.

Inheritance
Implemented types

Constructors

IFileDialog2(VTablePointer ptr)
Creates a new instance of IFileDialog2 from a VTablePointer.
IFileDialog2.from(IUnknown interface)
Creates a new instance of IFileDialog2 from an existing interface.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ptr VTablePointer
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addPlace(IShellItem? psi, FDAP fdap) → void
Adds a folder to the list of places available for the user to open or save items.
inherited
addRef() int
Increments the reference count of this COM object.
inherited
advise(IFileDialogEvents? pfde) int
Assigns an event handler that listens for events coming from the dialog.
inherited
clearClientData() → void
Instructs the dialog to clear all persisted state information.
inherited
close(HRESULT hr) → void
Closes the dialog.
inherited
getCurrentSelection() IShellItem?
Gets the user's current selection in the dialog.
inherited
getFileName() PWSTR
Retrieves the text currently entered in the dialog's File name edit box.
inherited
getFileTypeIndex() int
Gets the currently selected file type.
inherited
getFolder() IShellItem?
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.
inherited
getOptions() FILEOPENDIALOGOPTIONS
Gets the current flags that are set to control dialog behavior.
inherited
getResult() IShellItem?
Gets the choice that the user made in the dialog.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryInterface<T extends IUnknown>() → T
Queries this COM object for a specific interface defined by the type parameter T.
inherited
release() int
Decrements the reference count of this COM object.
inherited
setCancelButtonLabel(PCWSTR pszLabel) → void
Replaces the default text Cancel on the common file dialog's Cancel button.
setClientGuid(Pointer<GUID> guid) → void
Enables a calling application to associate a GUID with a dialog's persisted state.
inherited
setDefaultExtension(PCWSTR pszDefaultExtension) → void
Sets the default extension to be added to file names.
inherited
setDefaultFolder(IShellItem? psi) → void
Sets the folder used as a default if there is not a recently used folder value available.
inherited
setFileName(PCWSTR pszName) → void
Sets the file name that appears in the File name edit box when that dialog box is opened.
inherited
setFileNameLabel(PCWSTR pszLabel) → void
Sets the text of the label next to the file name edit box.
inherited
setFileTypeIndex(int iFileType) → void
Sets the file type that appears as selected in the dialog.
inherited
setFileTypes(int cFileTypes, Pointer<COMDLG_FILTERSPEC> rgFilterSpec) → void
Sets the file types that the dialog can open or save.
inherited
setFilter(IShellItemFilter? pFilter) → void
SetFilter is no longer available for use as of Windows 7.
inherited
setFolder(IShellItem? psi) → void
Sets a folder that is always selected when the dialog is opened, regardless of previous user action.
inherited
setNavigationRoot(IShellItem? psi) → void
Specifies a top-level location from which to begin browsing a namespace, for instance in the Save dialog's Browse folder option.
setOkButtonLabel(PCWSTR pszText) → void
Sets the text of the Open or Save button.
inherited
setOptions(FILEOPENDIALOGOPTIONS fos) → void
Sets flags to control the behavior of the dialog.
inherited
setTitle(PCWSTR pszTitle) → void
Sets the title of the dialog.
inherited
show(HWND? hwndOwner) → void
Launches the modal window.
inherited
toString() String
A string representation of this object.
override
unadvise(int dwCookie) → void
Removes an event handler that was attached through the IFileDialog.advise method.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited