Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IResultData::SetViewMode method

The IResultData::SetViewMode method enables the snap-in to set the view mode in which the result view pane displays its items. Be aware that view modes apply only to list views.

Syntax


HRESULT SetViewMode(
  [inlong lViewMode
);

Parameters

lViewMode [in]

A value that specifies the view mode to be set in the result pane. It can be one of the following values:

MMCLV_VIEWSTYLE_ICON

Items are displayed as title strings under their large (32x32) icon representations. Subitems and headers are not displayed.

MMCLV_VIEWSTYLE_REPORT

Items are displayed as title strings to the right of their small (16x16) icon representations. Items are tabulated under the header in the zero position of the zero-based index on the left side of the result view pane. Subsequent headers are produced from left to right and corresponding subitems are placed beneath each. To enter the report mode, you must have already called IConsole::SetHeader.

MMCLV_VIEWSTYLE_SMALLICON

Items are displayed as title strings under their small (16x16) icon representations. Subitems and headers are not displayed.

MMCLV_VIEWSTYLE_LIST

Items are displayed as title strings to the right of their small (16x16) icon representations. Subitems and headers are not displayed.

MMCLV_VIEWSTYLE_FILTERED

Allows a snap-in to programmatically set the view mode to filtered view. For more information about filtered views, see Adding Filtered Views.

This parameter must not be NULL.

Return value

This method can return one of these values.

S_OK

The view mode was successfully set.

E_UNEXPECTED

The current result view type is not a standard console list view. If the snap-in returned a view type that was a custom OCX or a webpage in the ppViewType parameter of its IComponent::GetResultViewType method, any method that handles columns will return E_UNEXPECTED.

E_INVALIDARG

The lViewMode parameter is NULL.

The lViewMode parameter is not a valid view type.

Remarks

This method provides the same functionality for both virtual and non-virtual list views. For more information about a scenario where you could use IResultData::SetViewMode, see Using List Views: Implementation Details.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IResultData2
IResultData
IResultData::GetViewMode

 

 

Show: