COleDocument::GetNextClientItem

Call this function repeatedly to access each of the client items in your document.

COleClientItem* GetNextClientItem( 
   POSITION& pos  
) const;

Parameters

  • pos
    A reference to a POSITION value set by a previous call to GetNextClientItem; the initial value is returned by the GetStartPosition member function.

Return Value

A pointer to the next client item in the document, or NULL if there are no more client items.

Remarks

After each call, the value of pos is set for the next item in the document, which might or might not be a client item.

Example

// pDoc points to a COleDocument object
POSITION pos = pDoc->GetStartPosition();
COleClientItem *pItem;
CString strType;
while ((pItem = pDoc->GetNextClientItem(pos)) != NULL)
{
   // Use pItem
   pItem->GetUserType(USERCLASSTYPE_FULL, strType);
   TRACE(strType);
}

Requirements

Header: afxole.h

See Also

Reference

COleDocument Class

Hierarchy Chart

COleClientItem Class

COleDocument::GetStartPosition

COleDocument::GetNextServerItem

COleDocument::GetNextItem