This documentation is archived and is not being maintained.

CDocObjectServer::OnSaveViewState 

Override this function to save extra state information about your DocObject view.


virtual void OnSaveViewState(
   CArchive& ar 
);

Parameters

ar

A CArchive object to which the view state is serialized.

Your state might include properties like the view type, zoom factor, insertion and selection point, and so on. The container typically calls this function before deactivating the view. The saved state can later be restored through OnApplyViewState.

You can use OnSaveViewState to store persistent information specific to your view's state. If you override OnSaveViewState to store information, you will want to override OnApplyViewState to read that information and apply it to your view when it is newly activated.

Show: