IColumnManager::SetColumns method

Sets the collection of columns for the view to display.

Syntax

HRESULT SetColumns(
  const PROPERTYKEY *rgkeyOrder,
  UINT              cVisible
);

Parameters

rgkeyOrder

Type: const PROPERTYKEY*

A pointer to an array of PROPERTYKEY structures that specify the columns to display.

cVisible

Type: UINT

The size of the rgkeyOrder array.

Return Value

Type: HRESULT

Returns one of the following values:

Return code Description
S_OK
Collection set.
failure
Collection not set.

Remarks

Note  IColumnManager::SetColumns clears the state of all columns, so IColumnManager::SetColumnInfo must be called afterward to set the state of individual columns.
 

Requirements

   
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)
DLL Shell32.dll (version 5.0 or later)