IUICollectionChangedEvent::OnChanged method (uiribbon.h)

Called when an IUICollection changes.

Syntax

HRESULT OnChanged(
  [in] UI_COLLECTIONCHANGE action,
  [in] UINT32              oldIndex,
  [in] IUnknown            *oldItem,
  [in] UINT32              newIndex,
  [in] IUnknown            *newItem
);

Parameters

[in] action

Type: UI_COLLECTIONCHANGE

The action performed on the IUICollection.

[in] oldIndex

Type: UINT32

Index of the old item on remove or replace; otherwise UI_COLLECTION_INVALIDINDEX.

[in] oldItem

Type: IUnknown*

Pointer to the old item on remove or replace; otherwise NULL.

[in] newIndex

Type: UINT32

Index of the new item on insert, add, or replace; otherwise UI_COLLECTION_INVALIDINDEX.

[in] newItem

Type: IUnknown*

Pointer to the new item on insert, add, or replace; otherwise NULL.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The IUICollectionChangedEvent::OnChanged interface is implemented by the Ribbon host application (the client connection sink) as a listener for collection changed events that are fired by the Ribbon (the connectable object).

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header uiribbon.h
DLL Mshtml.dll

See also

Events in COM and Connectable Objects

Gallery Sample

IUICollection

IUICollectionChangedEvent