Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IMAPITable::CollapseRow

Collapses an expanded table category, removing the leaf rows belonging to the category from the table view.

HRESULT CollapseRow(
ULONG cbInstanceKey,
LPBYTE pbInstanceKey,
ULONG ulFlags,
ULONG FAR * lpulRowCount
);

Parameters

cbInstanceKey

[in] Count of bytes in the PR_INSTANCE_KEY property pointed to by the pbInstanceKey parameter.

pbInstanceKey

[in] Pointer to the PR_INSTANCE_KEY (PidTagInstanceKey) property that identifies the heading row for the category.

ulFlags

Reserved; must be zero.

lpulRowCount

[out] Pointer to the total number of rows that are being removed from the table view.

S_OK

The collapse operation has succeeded.

MAPI_E_NOT_FOUND

The row identified by the pbInstanceKey parameter does not exist.

MAPI_E_INVALID_ENTRYID

The row identified by the pbInstanceKey parameter does not exist. This error is an alternative to MAPI_E_NOT_FOUND; service providers can return either one.

The IMAPITable::CollapseRow method collapses a table category and removes it from the table view. The rows are collapsed starting at the row identified by the PR_INSTANCE_KEY property pointed to by the pbInstanceKey parameter. The number of rows that are removed from the view is returned in the contents of the lpulRowCount parameter.

Notifications are never generated for table rows that are removed from a view as the result of a collapse operation.

When a row that is defined by a bookmark is collapsed out of view, the bookmark is moved to point to the next visible row.

For more information about categorized tables, see Sorting and Categorization.

For MFCMAPI sample code, see the following table.

FileFunctionComment

ContentsTableListCtrl.cpp

CContentsTableListCtrl::DoExpandCollapse

MFCMAPI uses the IMAPITable::CollapseRow method to collapse a table category.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.