COleServerDoc::UpdateAllItems

voidUpdateAllItems(COleServerItem*pSender,LPARAMlHint**=0L,CObject*pHint=NULL,DVASPECTnDrawAspect=DVASPECT_CONTENT);**

Parameters

pSender

Pointer to the item that modified the document, or NULL if all items are to be updated.

lHint

Contains information about the modification.

pHint

Pointer to an object storing information about the modification.

nDrawAspect

Determines how the item is to be drawn. This is a value from the DVASPECT enumeration. This parameter can have one of the following values:

  • DVASPECT_CONTENT   Item is represented in such a way that it can be displayed as an embedded object inside its container.

  • DVASPECT_THUMBNAIL   Item is rendered in a “thumbnail” representation so that it can be displayed in a browsing tool.

  • DVASPECT_ICON   Item is represented by an icon.

  • DVASPECT_DOCPRINT   Item is represented as if it were printed using the Print command from the File menu.

Remarks

Call this function to notify all linked items connected to the document that the document has changed. You typically call this function after the user changes the server document. If an OLE item is linked to the document with an automatic link, the item is updated to reflect the changes. In container applications written with the Microsoft Foundation Class Library, the OnChange member function of COleClientItem is called.

This function calls the OnUpdate member function for each of the document’s items except the sending item, passing pHint, lHint, and nDrawAspect. Use these parameters to pass information to the items about the modifications made to the document. You can encode information using lHint or you can define a CObject-derived class to store information about the modifications and pass an object of that class using pHint. Override the OnUpdate member function in your COleServerItem-derived class to optimize the updating of each item depending on whether its presentation has changed.

COleServerDoc OverviewClass MembersHierarchy Chart

See Also   COleServerDoc::NotifyChanged, COleServerItem::OnUpdate, COleServerDoc::NotifySaved, COleClientItem::OnChange