IFileDialog2 interface (shobjidl.h)
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.
Inheritance
The IFileDialog2 interface inherits from IFileDialog. IFileDialog2 also has these types of members:
Methods
The IFileDialog2 interface has these methods.
IFileDialog2::SetCancelButtonLabel Replaces the default text "Cancel" on the common file dialog's Cancel button. |
IFileDialog2::SetNavigationRoot Specifies a top-level location from which to begin browsing a namespace, for instance in the Save dialog's Browse folder option. Users cannot navigate above this location. |
Remarks
This interface also provides the methods of the IFileDialog interface, from which it inherits.
When to Implement
An implementation of this interface is provided with Windows. Third parties do not provide custom implementations.When to Use
Use the methods of this interface in two instances:- When you want to restrict the dialog's navigation to a specific namespace.
- When you need the dialog's Cancel button to be labeled differently in keeping with your functionality.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl.h |