OFN Enumeration
Note: This API is now obsolete.
Enumeration that contains flags that specify the operation mode for GetOpenFileName methods.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Namespace: Microsoft.TeamFoundation.Common
Assembly: Microsoft.VisualStudio.TeamFoundation.Client (in Microsoft.VisualStudio.TeamFoundation.Client.dll)
Syntax
'Declaration
<FlagsAttribute> _
<ObsoleteAttribute("The OFN enumeration is no longer used and will be removed in the subsequent release.")> _
Public Enumeration OFN
[FlagsAttribute]
[ObsoleteAttribute("The OFN enumeration is no longer used and will be removed in the subsequent release.")]
public enum OFN
[FlagsAttribute]
[ObsoleteAttribute(L"The OFN enumeration is no longer used and will be removed in the subsequent release.")]
public enum class OFN
[<FlagsAttribute>]
[<ObsoleteAttribute("The OFN enumeration is no longer used and will be removed in the subsequent release.")>]
type OFN
public enum OFN
Members
Member name | Description | |
---|---|---|
OFN_ALLOWMULTISELECT | When this flag is enabled, multiple selections in the file name list box are allowed. | |
OFN_CREATEPROMPT | When this flag is enabled, the user is prompted for permission to create a file if it does not exist. | |
OFN_DONTADDTORECENT | When this flag is enabled, the link to the opened file will not be added to the list of recently used documents. | |
OFN_ENABLEHOOK | Enables the hook function. | |
OFN_ENABLEINCLUDENOTIFY | Enables you to control which items the dialog box displays in the folder's item list. | |
OFN_ENABLESIZING | When this flag is enabled, the dialog box can be resized using either the mouse or the keyboard. | |
OFN_ENABLETEMPLATE | Uses the specified template object to generate an explorer window.If the OFN_EXPLORER flag is set, the system uses the specified template to create a dialog box that is a child of the default Explorer-style dialog box. If the OFN_EXPLORER flag is not set, the system uses the template to create an old-style dialog box that replaces the default dialog box. | |
OFN_ENABLETEMPLATEHANDLE | Uses the specified template handle to generate a new explorer window.If the OFN_EXPLORER flag is set, the system uses the specified template to create a dialog box that is a child of the default Explorer-style dialog box. If the OFN_EXPLORER flag is not set, the system uses the template to create an old-style dialog box that replaces the default dialog box. | |
OFN_EXPLORER | Indicates that any customizations made to the Open or Save As dialog box use the Explorer-style customization methods. | |
OFN_EXTENSIONDIFFERENT | This flag is enabled if the user typed an extension that is different than the default. | |
OFN_FILEMUSTEXIST | When this flag is enabled, the user can type only names of existing files in the File Name entry field. | |
OFN_FORCESHOWHIDDEN | When this flag is enabled, system and hidden files are shown regardless of user settings. | |
OFN_HIDEREADONLY | When this flag is enabled, the read only check box is hidden. | |
OFN_LONGNAMES | When this flag is enabled, the dialog box uses long file names. For Explorer-style dialog boxes, long file names are always enabled, regardless of this flag’s setting. | |
OFN_NOCHANGEDIR | When this flag is enabled, the current directory cannot be changed.This flag is ineffective for GetOpenFileName. | |
OFN_NODEREFERENCELINKS | When this flag is enabled, the path and filename of the shortcut link is returned; otherwise, the path and filename of the file the link references is returned. | |
OFN_NOLONGNAMES | When this flag is enabled, long file names are suppressed. For Explorer-style dialog boxes, long filenames are always displayed. | |
OFN_NONETWORKBUTTON | When this flag is enabled, the network button is hidden and disabled. | |
OFN_NOREADONLYRETURN | When this flag is enabled, the returned file does not have the read-only check box selected and is not in a write-protected directory. | |
OFN_NOTESTFILECREATE | When this flag is enabled, a test file is not created before the dialog box is closed.This means the function does not check for write protection, full disk, or network protection. Applications using this flag must perform file operations carefully, because a file cannot be reopened once it is closed. | |
OFN_NOVALIDATE | When this flag is set, the common dialog boxes allow invalid characters in the returned file name. | |
OFN_OVERWRITEPROMPT | When this flag is set, the user must confirm whether to overwrite the file if one already exists. | |
OFN_PATHMUSTEXIST | When this flag is set, the user can type only valid paths and file names. | |
OFN_READONLY | When this flag is set, the Read Only check box is initially selected when the dialog box is created. When the dialog box is closed, this flag indicates the state of the Read Only check box at close. | |
OFN_SHAREAWARE | Specifies that if a call to the OpenFile function fails because of a network sharing violation, the error is ignored and the dialog box returns the selected file name. If this flag is not set, the dialog box notifies your hook procedure when a network sharing violation occurs for the file name specified by the user. If you set the OFN_EXPLORER flag, the dialog box sends the CDN_SHAREVIOLATION message to the hook procedure. If you do not set OFN_EXPLORER, the dialog box sends the SHAREVISTRING registered message to the hook procedure. | |
OFN_SHOWHELP | When this flag is set, the help button is displayed. |
Remarks
These flags are used by the IVsUIShell.GetOpenFileNameViaDlg().
More information on the OPENFILENAME flags can be found on MSDN: OPENFILENAME Structure