IUICollectionChangedEvent::OnChanged method

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

action [in]

Type: UI_COLLECTIONCHANGE

The action performed on the IUICollection.

oldIndex [in]

Type: UINT32

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

oldItem [in]

Type: IUnknown*

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

newIndex [in]

Type: UINT32

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

newItem [in]

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Product

Windows UI

Header

Uiribbon.h

IDL

Uiribbon.idl

DLL

Mshtml.dll

See also

IUICollectionChangedEvent
IUICollection
Gallery Sample
Events in COM and Connectable Objects

 

 

Community Additions

ADD
Show: