IOwnerDataCallback

IID_IOwnerDataCallback {44C09D56-8D3B-419D-A462-7B956B105B47}

The IOwnerDataCallback methods are (as ordered in the virtual function table after the IUnknown methods):

Offset Method
0x0C GetItemPosition
0x10 SetItemPosition
0x14 GetItemInGroup
0x18 GetItemGroup
0x1C GetItemGroupCount
0x20 OnCacheHint

with prototypes:

HRESULT GetItemPosition (INT, POINT *);
HRESULT SetItemPosition (INT, POINT);
HRESULT GetItemInGroup (INT, INT, INT *);
HRESULT GetItemGroup (INT, INT, INT *);
HRESULT GetItemGroupCount (INT, INT *);
HRESULT OnCacheHint (LVITEMINDEX, LVITEMINDEX);

Implementation

The one known purpose of the IOwnerDataCallback interface is to provide a set of callback functions for a List-View control. The interface is to be implemented by any component that has access to a List-View control and wants to participate in the handling. To register this set of callback functions for a List-View control, pass the address of the IOwnerDataCallback interface as the argument to the SetOwnerDataCallback method of the control’s IListView interface. Alternatively, send message 0x10BB to the List-View control, with wParam addressing the IOwnerDataCallback interface.

Thus, COMCTL32 supports the interface for someone else to implement. The only known implementation is in SHELL32.

Availability

The IOwnerDataCallback interface is supported by COMCTL32 versions 6.10 and higher.

Though new for Windows Vista, this interface is not documented by Microsoft in the January 2007 edition of the Software Development Kit (SDK) for Windows Vista.