Share via


COleClientItem::OnDeactivate

Called by the framework when the OLE item transitions from the in-place active state (activeState) to the loaded state, meaning that it is deactivated after an in-place activation.

virtual void OnDeactivate( );

Remarks

Note that this function is called to indicate that the OLE item is closed, not that its user interface has been removed from the container application. When that happens, the OnDeactivateUI member function is called.

The default implementation calls the OnChange member function with OLE_CHANGEDSTATE as a parameter. Override this function to perform custom processing when an in-place active item is deactivated. For example, if you support the undo command in your container application, you can override this function to discard the undo state, indicating that the last operation performed on the OLE item cannot be undone once the item is deactivated.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem::OnGetWindowContext

COleClientItem::OnDeactivateUI

COleClientItem::OnActivateUI

COleClientItem::OnActivate

COleClientItem::CanActivate

CDocTemplate::SetContainerInfo

Other Resources

COleClientItem Members