IFileDialog::SetFileTypeIndex method (shobjidl_core.h)

Sets the file type that appears as selected in the dialog.

Syntax

HRESULT SetFileTypeIndex(
  [in] UINT iFileType
);

Parameters

[in] iFileType

Type: UINT

The index of the file type in the file type array passed to IFileDialog::SetFileTypes in its cFileTypes parameter. Note that this is a one-based index, not zero-based.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method must be called before the dialog is showing.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)