IHeaderCtrl2::SetColumnFilter method (mmc.h)

The IHeaderCtrl2::SetColumnFilter sets the filter value and its maximum character length for a specified column in a filtered list.

Syntax

HRESULT SetColumnFilter(
  [in] UINT           nColumn,
  [in] DWORD          dwType,
  [in] MMC_FILTERDATA *pFilterData
);

Parameters

[in] nColumn

A zero-based index that identifies the column for which the filter value and its maximum character length are to be set.

[in] dwType

Filter type to apply to the specified column, taken from the MMC_FILTER_TYPE enumeration.

[in] pFilterData

A pointer to an MMC_FILTERDATA structure that holds the actual filter data.

Return value

This method can return one of these values.

Remarks

For both setting and reading filter values, the snap-in owns the MMC_FILTERDATA structure and any text buffer.

If the snap-in does not explicitly set the filter data for a column in a filtered list by calling IHeaderCtrl2::SetColumnFilter, the filter type defaults to MMC_STRING_FILTER with no default value for the filter (MMC_FILTER_NOVALUE). The default length of the filter is not documented by the Win32 header control, but it is of sufficient length for most likely user inputs. If the snap-in requires a specific length, it should call IHeaderCtrl2::SetColumnFilter.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header mmc.h
DLL Mmcndmgr.dll

See also

IHeaderCtrl2