Condividi tramite


COleDocument::GetNextServerItem

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

COleServerItem* GetNextServerItem(
   POSITION& pos 
) const;

Parameters

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

Return Value

A pointer to the next server item in the document, or NULL if there are no more server 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 server item.

Example

// pDoc points to a COleDocument object
POSITION pos = pDoc->GetStartPosition();
COleServerItem *pItem;
while ((pItem = pDoc->GetNextServerItem(pos)) != NULL)
{
   // Use pItem
}

Requirements

Header: afxole.h

See Also

Reference

COleDocument Class

Hierarchy Chart

COleServerItem Class

COleDocument::GetStartPosition

COleDocument::GetNextClientItem

COleDocument::GetNextItem

Other Resources

COleDocument Members