IOleDocumentView::ApplyViewState method (docobj.h)
Initializes a view with view state previously saved in call to IOleDocumentView::SaveViewState.
Syntax
HRESULT ApplyViewState(
[in] LPSTREAM pstm
);
Parameters
[in] pstm
A pointer to a stream containing data from which the view should initialize itself.
Return value
This method returns S_OK on success. Other possible return values include the following.
Return code | Description |
---|---|
|
The value in pstm is NULL. |
|
This view has no meaningful state to load. This error should be rare because most views will have at least some state information worth loading. |
Remarks
Typically, this function is called after an existing view has been created in the container but before that view has been displayed. It is the responsibility of the view to validate the data in the view stream; the container does not attempt to interpret the view's state data.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | docobj.h |