COleClientItem::OnChange

virtual void OnChange( OLE_NOTIFICATION nCode, DWORD dwParam );

Parameters

nCode

The reason the server changed this item. It can have one of the following values:

dwParam

If nCode is OLE_SAVED or OLE_CLOSED, this parameter is not used. If nCode is OLE_CHANGED, this parameter specifies the aspect of the OLE item that has changed. For possible values, see the dwParam parameter of COleClientItem::Draw. If nCode is OLE_CHANGED_STATE, this parameter is a COleClientItem::ItemState enumerated value and describes the state being entered. It can have one of the following values: emptyState, loadedState, openState, activeState, or activeUIState.

Remarks

Called by the framework when the user modifies, saves, or closes the OLE item. (If the server application is written using the Microsoft Foundation Class Library, this function is called in response to the Notify member functions of COleServerDoc or COleServerItem.) The default implementation marks the container document as modified if nCode is OLE_CHANGED or OLE_SAVED.

For OLE_CHANGED_STATE, the current state returned from GetItemState will still be the old state, meaning the state that was current prior to this state change.

Override this function to respond to changes in the OLE item’s state. Typically you update the item’s appearance by invalidating the area in which the item is displayed. Call the base class implementation at the beginning of your override.

COleClientItem OverviewClass MembersHierarchy Chart

See Also   COleClientItem::GetItemState, COleServerItem::NotifyChanged, COleServerDoc::NotifyChanged, COleServerDoc::NotifyClosed, COleServerDoc::NotifySaved