IResultData::ModifyViewStyle

[This is preliminary documentation and subject to change.]

Enables the snap-in set the result pane's view style.

HRESULT ModifyViewStyle(
  MMC_RESULT_VIEW_STYLE add,  // Styles to be added
  MMC_RESULT_VIEW_STYLE remove  // Styles to be removed
);
 

Parameters

add
[in] Specifies the view style (or styles) to be set in the result view pane. This value can be a valid combination of the following:
Value Meaning
MMC_SINGLESEL Allows only one item at a time to be selected. By default, multiple items can be selected.
MMC_SHOWSELALWAYS Always show the selection, if any, even if the control does not have the focus.
MMC_NOSORTHEADER Specifies that column headers do not work like buttons. This style is useful if clicking on a column header in report view does not carry out an action, such as sorting.

These values are from the MMC_RESULT_VIEW_STYLE enumeration and correspond to the Win32 LVS_* flags of the same names.

remove
[in] Specifies the view style (or styles) to be removed from the result view pane. This value can be a valid combination of the flags shown for the add parameter shown above. As noted there, these values are from the MMC_RESULT_VIEW_STYLE enumeration and correspond to the Win32 LVS_* flags of the same names.

Return Values

S_OK
The view style was successfully set.
S_FALSE
The view style was not set.
E_UNEXPECTED
An unexpected error occurred.

Remarks

This method provides the same functionality for both result view panes and virtual lists.

See Also

IResultData